Data Warehousing and Decision Support courtesy of Jiawei Han, Larry Kerschberg, and etc. for some slides. Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY.

Slides:



Advertisements
Similar presentations
Outline What is a data warehouse? A multi-dimensional data model Data warehouse architecture Data warehouse implementation Further development of data.
Advertisements

11 Data Mining: Concepts and Techniques (3 rd ed.) — Chapter 4 — Jiawei Han, Micheline Kamber, and Jian Pei University of Illinois at Urbana-Champaign.
April 30, Data Warehousing and OLAP Technology: An Overview  What is a data warehouse?  Data warehouse architecture  From data warehousing to.
Data Warehousing.
Introduction to Data Warehousing CPS Notes 6.
Advanced Querying OLAP Data Warehousing. Database Applications Transaction processing –Online setting –Supports day-to-day operation of business Decision.
ICS 421 Spring 2010 Data Warehousing 2 Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 3/30/20101Lipyeow.
ICS 421 Spring 2010 Data Warehousing (1) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 3/18/20101Lipyeow.
The Role of Data Warehousing and OLAP Technologies CS 536 – Data Mining These slides are adapted from J. Han and M. Kamber’s book slides (
1 CIS *717.2 Data Warehouse Design Week 2 Dimensional Modeling Primer Data Warehouse Models OLAP Operations Instructor Carmela R. Balassiano Feb 5, Spring.
Data Warehousing & OLAP
Data Warehouses and OLAP
Data Warehousing Xintao Wu. Evolution of Database Technology (See Fig. 1.1) 1960s: Data collection, database creation, IMS and network DBMS 1970s: Relational.
Data Warehousing.
Dr. M. Sulaiman Khan Dept. of Computer Science University of Liverpool 2010 COMP207: Data Mining Data Warehousing COMP207: Data Mining.
1 Lecture 10: More OLAP - Dimensional modeling
© Tan,Steinbach, Kumar Introduction to Data Mining 8/05/ Data Warehouse and Data Cube Lecture Notes for Chapter 3 Introduction to Data Mining By.
Business Systems Intelligence: 3. Data Warehousing Dr. Brian Mac Namee (
Ch3 Data Warehouse part2 Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2009.
1 Data Warehousing and OLAP. 2 Data Warehousing & OLAP Defined in many different ways, but not rigorously.  A decision support database that is maintained.
Ch3 Data Warehouse Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2010.
1 Data Warehouses C hapter 2. 2 Chapter 2 Outline Chapter 2 Outline – Introduction –Data Warehouses –Data Warehouse in Organisation – OLTP vs. OLAP –Why.
Dr. Bernard Chen Ph.D. University of Central Arkansas
8/20/ Data Warehousing and OLAP. 2 Data Warehousing & OLAP Defined in many different ways, but not rigorously. Defined in many different ways, but.
CIS664-Knowledge Discovery and Data Mining
Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke1 Decision Support Chapter 23.
8/25/2015Data Mining: Concepts and Techniques 1 Data Mining: Concepts and Techniques — Chapter 3 — Jiawei Han Department of Computer Science University.
August 25, 2015Data Mining: Concepts and Techniques 1 Data Warehousing What is a data warehouse? A multi-dimensional data model Data warehouse architecture.
An overview of Data Warehousing and OLAP Technology
August 25, 2015Data Mining: Concepts and Techniques 1 Data Mining: Concepts and Techniques — Chapter 3 —
School of Management, HUST
Introduction to Data Mining and Data Warehousing Muhammad Ali Yousuf DSC – ITM Friday, 9 th May 2003.
Data Warehousing.
October 6, 2015Data Mining: Concepts and Techniques 1 Chapter 3: Data Warehousing and OLAP Technology: An Overview What is a data warehouse? A multi-dimensional.
1 Cube Computation and Indexes for Data Warehouses CPS Notes 7.
1 Data Warehousing and Decision Support. 2 Data Warehousing and OLAP Technology What is a data warehouse? A multi-dimensional data model Data warehouse.
Data Warehousing Xintao Wu. Can You Easily Answer These Questions? What are Personnel Services costs across all departments for all funding sources? What.
1 Fall 2004, CIS, Temple University CIS527: Data Warehousing, Filtering, and Mining Lecture 2 Data Warehousing and OLAP Technology for Data Mining Lecture.
DATA WAREHOUSING UNIT-IV October 21,
October 28, Data Warehouse Architecture Data Sources Operational DBs other sources Analysis Query Reports Data mining Front-End Tools OLAP Engine.
Knowledge Discovery and Data Mining Vasileios Megalooikonomou Dept. of Computer and Information Sciences Temple University Data Warehousing and OLAP Technology.
1 Data Warehousing & OLAP. 2 Data Warehousing and OLAP Technology for Data Mining What is a data warehouse? A multi-dimensional data model Data warehouse.
Dr. N. MamoulisAdvanced Database Technologies1 Topic 6: Data Warehousing & OLAP Defined in many different ways, but not rigorously. A decision support.
Ch3 Data Warehouse Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2009.
1 Data Mining: Concepts and Techniques — Chapter 2 —
Data Mining Data Warehouses.
M. Sulaiman Khan Dept. of Computer Science University of Liverpool 2009 This is the full course notes, but not quite complete. You.
2016年1月21日星期四 2016年1月21日星期四 2016年1月21日星期四 Data Mining: Concepts and Techniques 1 Data Mining: Concepts and Techniques — Chapter 3 — Jiawei Han Department.
January 21, 2016Data Mining: Concepts and Techniques 1 Chapter 3: Data Warehousing and OLAP Technology: An Overview What is a data warehouse? A multi-dimensional.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Data Warehousing and Decision Support Chapter 25.
Datawarehousing and OLAP C.Eng 714 Spring
CPT-S Advanced Databases 1 Yinghui Wu EME 49 ADB (ln27)
June 12, 2016Data Mining: Concepts and Techniques 1 Data Mining: Concepts and Techniques — Chapter 3 — Jiawei Han Department of Computer Science University.
Data Warehouses and OLAP. Data Warehousing and OLAP Technology for Data Mining  What is a data warehouse?  A multi-dimensional data model  Data warehouse.
1 Chapter 4: Data Warehousing and On-line Analytical Processing Data Warehouse: Basic Concepts Data Warehouse Modeling: Data Cube and OLAP Data Warehouse.
Data Mining and Data Warehousing: Concepts and Techniques What is a Data Warehouse? Data Warehouse vs. other systems, OLTP vs. OLAP Conceptual Modeling.
Data Mining: Data Warehousing
Introduction to Data Warehousing
Information Management course
Data warehouse and OLAP
Data Mining: Concepts and Techniques (3rd ed.) — Chapter 4 —
Information Management course
OLAP Concepts and Techniques
Data Warehousing and OLAP Technology for Data Mining
Chapter 2: Data Warehousing and OLAP Technology for Data Mining
Lecture 4: From Data Cubes to ML
Overview of Data Warehousing and OLAP
Data Warehousing and Decision Support Chapter 25
Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2009
Data Mining: Concepts and Techniques
Presentation transcript:

Data Warehousing and Decision Support courtesy of Jiawei Han, Larry Kerschberg, and etc. for some slides. Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY

August 25, 2015 Data Mining: Concepts and Techniques 2 Outline Data Warehouse: Basic Concepts Data Warehouse Modeling: Data Cube and OLAP Summary

August 25, 2015 Data Mining: Concepts and Techniques 3 What is a Data Warehouse? Defined in many different ways, but not rigorously.  A decision support database that is maintained separately from the organization’s operational database  Support information processing by providing a solid platform of consolidated, historical data for analysis. “A data warehouse is a subject-oriented, integrated, time-variant, and nonvolatile collection of data in support of management’s decision- making process.”—W. H. Inmon Data warehousing:  The process of constructing and using data warehouses

August 25, 2015 Data Mining: Concepts and Techniques 4 Data Warehouse—Subject-Oriented Organized around major subjects, such as customer, product, sales Focusing on the modeling and analysis of data for decision makers, not on daily operations or transaction processing Provide a simple and concise view around particular subject issues by excluding data that are not useful in the decision support process

August 25, 2015 Data Mining: Concepts and Techniques 5 Data Warehouse—Integrated Constructed by integrating multiple, heterogeneous data sources  relational databases, flat files, on-line transaction records Data cleaning and data integration techniques are applied.  Ensure consistency in naming conventions, encoding structures, attribute measures, etc. among different data sources E.g., Hotel price: currency, tax, breakfast covered, etc.  When data is moved to the warehouse, it is converted.

August 25, 2015 Data Mining: Concepts and Techniques 6 Data Warehouse—Time Variant The time horizon for the data warehouse is significantly longer than that of operational systems  Operational database: current value data  Data warehouse data: provide information from a historical perspective (e.g., past 5-10 years) Every key structure in the data warehouse  Contains an element of time, explicitly or implicitly  But the key of operational data may or may not contain “time element”

August 25, 2015 Data Mining: Concepts and Techniques 7 Data Warehouse—Nonvolatile A physically separate store of data transformed from the operational environment Operational update of data does not occur in the data warehouse environment  Does not require transaction processing, recovery, and concurrency control mechanisms  Requires only two operations in data accessing: initial loading of data and access of data

August 25, 2015 Data Mining: Concepts and Techniques 8 OLTP vs. OLAP

August 25, 2015 Data Mining: Concepts and Techniques 9 Why a Separate Data Warehouse? High performance for both systems  DBMS— tuned for OLTP: access methods, indexing, concurrency control, recovery  Warehouse—tuned for OLAP: complex OLAP queries, multidimensional view, consolidation Different functions and different data:  missing data: Decision support requires historical data which operational DBs do not typically maintain  data consolidation: DS requires consolidation (aggregation, summarization) of data from heterogeneous sources  data quality: different sources typically use inconsistent data representations, codes and formats which have to be reconciled Note: There are more and more systems which perform OLAP analysis directly on relational databases

August 25, 2015 Data Mining: Concepts and Techniques 10 Data Warehouse: A Multi-Tiered Architecture Data Warehouse Extract Transform Load Refresh OLAP Engine Analysis Query Reports Data mining Monitor & Integrator Metadata Data Sources Front-End Tools Serve Data Marts Operational DBs Other sources Data Storage OLAP Server

August 25, 2015 Data Mining: Concepts and Techniques 11 Extraction, Transformation, and Loading (ETL) Data extraction  get data from multiple, heterogeneous, and external sources Data cleaning  detect errors in the data and rectify them when possible Data transformation  convert data from legacy or host format to warehouse format Load  sort, summarize, consolidate, compute views, check integrity, and build indicies and partitions Refresh  propagate the updates from the data sources to the warehouse

August 25, 2015 Data Mining: Concepts and Techniques 12 Outline Data Warehouse: Basic Concepts Data Warehouse Modeling: Data Cube and OLAP Data Warehouse Design and Usage Data Warehouse Implementation Summary

Data Cube Concept Data Cube: A Relational Aggregation Operator Generalizing Group-By, Cross- Tab and Sub-Totals  By Jim Gray et al, in IEEE ICDE’1996

CUBE: A Relational Aggregate Operator Generalizing Group By (from Gray, et al)

Data Analysis Tasks Formulate a query to extract relevant information Extract the aggregated data from the database into a file. Visualize the result to look for patterns. Analyze the result and perhaps formulate new queries.

Goal of the Cube Represent N-dimensional data cubes using 2-D relations Compute the aggregate information within the database, Create language extensions to SQL that will support the required operations.

Relational Representation of N-Dimensional Data Weather information consists of four dimensions: Time, Latitude, Longitude and Altitude Measured variables are Temperature and Pressure. SQL 1992 Standard supports aggregation functions : Count (), Sum(), Min(), Max() and AVE(); Some SQL systems have Median, Standard Deviation, variance, etc. SELECT AVE(Temp) FROM Weather SELECT COUNT(DISTINCT Time) FROM Weather

SELECT Time, Altitude, AVE(Temp) FROM Weather GROUP BY Time, Altitude Group-By Operation and Aggregates Group-By operation defines an equivalence relation on a table, partitioning the tuples in classes having the same attribute values. Each group can then be aggregated. TCP-D has one 6D GROUP BY and three 3D GROUP Bys.

Problems with GROUP-BY Group-By cannot directly construct:  Histograms,  Roll-up Totals, Sub-totals for Drill-downs, and  Cross Tabulations.

Roll-Ups and Sub-Totals for Drill- Down Tables 3a, 3b, and 4 show Sales Roll Up by Model by Year by Color and an Excel Pivot Table with this information

Roll-Ups and Sub-Totals for Drill- Down Excel Pivot Table Sales Summary Roll Up in Table 5a and 5b for Chevy over all color and years (Note the ALL value)

SQL Query for Chevy Roll Up

Cube: Each Attribute is a Dimension N-dimensional Aggregate (sum(), max(),...)  Fits relational model exactly: a 1, a 2,...., a N, f() Super-aggregate over N-1 Dimensional sub-cubes ALL, a 2,...., a N, f() a 1, ALL, a 3,...., a N, f()... a 1, a 2,...., ALL, f()  This is the N-1 Dimensional cross-tab. Super-aggregate over N-2 Dimensional sub-cubes ALL, ALL, a 3,...., a N, f()... a 1, a 2,...., ALL, ALL, f()

Sub-cube Derivation Dimension collapse, * denotes ALL

Cube Operator Example CUBE

Interesting Aggregate Functions From RedBrick systems  Rank (in sorted order)  N-Tile (histograms)  Running average (cumulative functions)  Windowed running average  Percent of total Users want to define their own aggregate functions  statistics  domain specific

August 25, 2015 Data Mining: Concepts and Techniques 27 Conceptual Modeling of Data Warehouses Modeling data warehouses: dimensions & measures  Star schema: A fact table in the middle connected to a set of dimension tables  Snowflake schema: A refinement of star schema where some dimensional hierarchy is normalized into a set of smaller dimension tables, forming a shape similar to snowflake  Fact constellations: Multiple fact tables share dimension tables, viewed as a collection of stars, therefore called galaxy schema or fact constellation

August 25, 2015 Data Mining: Concepts and Techniques 28 Example of Star Schema time_key day day_of_the_week month quarter year time location_key street city state_or_province country location Sales Fact Table time_key item_key branch_key location_key units_sold dollars_sold avg_sales Measures item_key item_name brand type supplier_type item branch_key branch_name branch_type branch

August 25, 2015 Data Mining: Concepts and Techniques 29 Example of Snowflake Schema time_key day day_of_the_week month quarter year time location_key street city_key location Sales Fact Table time_key item_key branch_key location_key units_sold dollars_sold avg_sales Measures item_key item_name brand type supplier_key item branch_key branch_name branch_type branch supplier_key supplier_type supplier city_key city state_or_province country city

August 25, 2015 Data Mining: Concepts and Techniques 30 Example of Fact Constellation time_key day day_of_the_week month quarter year time location_key street city province_or_state country location Sales Fact Table time_key item_key branch_key location_key units_sold dollars_sold avg_sales Measures item_key item_name brand type supplier_type item branch_key branch_name branch_type branch Shipping Fact Table time_key item_key shipper_key from_location to_location dollars_cost units_shipped shipper_key shipper_name location_key shipper_type shipper

August 25, 2015 Data Mining: Concepts and Techniques 31 A Concept Hierarchy: Dimension (location) all EuropeNorth_America MexicoCanadaSpainGermany Vancouver M. WindL. Chan... all region office country TorontoFrankfurtcity

August 25, 2015 Data Mining: Concepts and Techniques 32 Data Cube Measures: Three Categories Distributive: if the result derived by applying the function to n aggregate values is the same as that derived by applying the function on all the data without partitioning E.g., count(), sum(), min(), max() Algebraic: if it can be computed by an algebraic function with M arguments (where M is a bounded integer), each of which is obtained by applying a distributive aggregate function E.g., avg(), min_N(), standard_deviation() Holistic: if there is no constant bound on the storage size needed to describe a subaggregate. E.g., median(), mode(), rank()

August 25, 2015 Data Mining: Concepts and Techniques 33 Typical OLAP Operations over Data Cube Roll up (drill-up): summarize data  by climbing up hierarchy or by dimension reduction Drill down (roll down): reverse of roll-up  from higher level summary to lower level summary or detailed data, or introducing new dimensions Slice and dice: project and select Pivot (rotate):  reorient the cube, visualization, 3D to series of 2D planes Other operations  drill across: involving (across) more than one fact table  drill through: through the bottom level of the cube to its back-end relational tables (using SQL)

August 25, 2015 Data Mining: Concepts and Techniques 34 Definition of Cube Operation A new operator cube by, introduced by Gray et al.’96 SELECT item, city, year, SUM (amount) FROM SALES CUBE BY item, city, year Need compute the following Group-Bys (date, product, customer), (date,product),(date, customer), (product, customer), (date), (product), (customer) () (item)(city) () (year) (city, item)(city, year)(item, year) (city, item, year)

August 25, 2015 Data Mining: Concepts and Techniques 35 Cube: A Lattice of Cuboids time,item time,item,location time, item, location, supplier all timeitemlocationsupplier time,location time,supplier item,location item,supplier location,supplier time,item,supplier time,location,supplier item,location,supplier 0-D (apex) cuboid 1-D cuboids 2-D cuboids 3-D cuboids 4-D (base) cuboid

August 25, 2015 Data Mining: Concepts and Techniques 36 Iceberg Cube Computing only the cuboid cells whose count or other aggregates satisfy a condition with minimum support, e.g. HAVING COUNT(*) >= minsup

August 25, 2015 Data Mining: Concepts and Techniques 37 Indexing OLAP Data: Bitmap Index Index on a particular column Each value in the column has a bit vector: bit-op is fast The length of the bit vector: # of records in the base table The i-th bit is set if the i-th row of the base table has the value for the indexed column  A recent bit compression technique, Word-Aligned Hybrid (WAH), makes it work for high cardinality domain as well [Wu, et al. TODS’06] Base table Index on RegionIndex on Type

August 25, 2015 Data Mining: Concepts and Techniques 38 Indexing OLAP Data: Join Indices Join index:  JI(R-id, S-id) where R (R-id, …)  S (S-id, …) In data warehouses, join index relates the values of the dimensions of a star schema to rows in the fact table.  E.g. fact table: Sales and two dimensions city and product A join index on city maintains for each distinct city a list of R-IDs of the tuples recording the Sales in the city  Join indices can span multiple dimensions

August 25, 2015 Data Mining: Concepts and Techniques 39 Efficient Processing OLAP Queries Determine which operations should be performed on the available cuboids  Transform drill, roll, etc. into corresponding SQL and/or OLAP operations, e.g., dice = selection + projection Determine which materialized cuboid(s) should be selected for OLAP op.  Let the query to be processed be on {brand, province_or_state} with the condition “year = 2004”, and there are 4 materialized cuboids available: 1) {year, item_name, city} 2) {year, brand, country} 3) {year, brand, province_or_state} 4) {item_name, province_or_state} where year = 2004 Which should be selected to process the query? Explore indexing structures and compressed vs. dense array structs in MOLAP

August 25, 2015 Data Mining: Concepts and Techniques 40 OLAP Server Architectures Relational OLAP (ROLAP)  Use relational or extended-relational DBMS to store and manage warehouse data and OLAP middle ware  Include optimization of DBMS backend, implementation of aggregation navigation logic, and additional tools and services  Greater scalability Multidimensional OLAP (MOLAP)  Sparse array-based multidimensional storage engine  Fast indexing to pre-computed summarized data Hybrid OLAP (HOLAP) (e.g., Microsoft SQLServer)  Flexibility, e.g., low level: relational, high-level: array

Summary Decision support is an emerging, rapidly growing subarea of databases. Involves the creation of large, consolidated data repositories called data warehouses. Warehouses exploited using sophisticated analysis techniques: complex SQL queries and OLAP “multidimensional”queries (influenced by both SQL and spreadsheets). New techniques for database design, indexing, view maintenance, and interactive querying need to be supported.