1 / 14

Data Warehouse and Data Cube

Data Warehouse and Data Cube. Lecture Notes for Chapter 3 Introduction to Data Mining By Tan, Steinbach, Kumar And Data Mining, by Han and Kamber, 2 nd Edition Revised by QY. OLAP. On-Line Analytical Processing (OLAP) was proposed by E. F. Codd, the father of the relational database.

blanca
Download Presentation

Data Warehouse and Data Cube

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Warehouse and Data Cube Lecture Notes for Chapter 3 Introduction to Data Mining By Tan, Steinbach, Kumar And Data Mining, by Han and Kamber, 2nd Edition Revised by QY

  2. OLAP • On-Line Analytical Processing (OLAP) was proposed by E. F. Codd, the father of the relational database. • Relational databases put data into tables, while OLAP uses a multidimensional array representation. • Such representations of data previously existed in statistics and other fields • There are a number of data analysis and data exploration operations that are easier with such a data representation.

  3. Creating a Multidimensional Array • Two key steps in converting tabular data into a multidimensional array. • First, identify which attributes are to be the dimensions and which attribute is to be the target attribute whose values appear as entries in the multidimensional array. • The attributes used as dimensions must have discrete values • The target value is typically a count or continuous value, e.g., the cost of an item • Can have no target variable at all except the count of objects that have the same set of attribute values • Second, find the value of each entry in the multidimensional array by summing the values (of the target attribute) or count of all objects that have the attribute values corresponding to that entry.

  4. Example: Iris data • We show how the attributes, petal length, petal width, and species type can be converted to a multidimensional array: from iris data http://archive.ics.uci.edu/ml/datasets/Iris • First, we discretized the petal width and length to have categorical values: low, medium, and high

  5. Example: Iris data (continued) • Each unique tuple of petal width, petal length, and species type identifies one element of the array. • This element is assigned the corresponding count value. • The figure illustrates the result. • All non-specified tuples are 0. Length

  6. OLAP Operations: Data Cube • The key operation of a OLAP is the formation of a data cube • A data cube is a multidimensional representation of data, together with all possible aggregates. • Aggregates: similar to class attribute • result by selecting a proper subset of the dimensions and summing over all remaining dimensions. • Cached to improve speed and support online computation • For example, • if we choose the species type dimension of the Iris data and • sum over all other dimensions, • the result will be a one-dimensional entry with three entries, • each of which gives the number of flowers of each type.

  7. From Tables and Spreadsheets to Data Cubes A data warehouse is based on a multidimensional data model which views data in the form of a data cube A data cube, such as sales, allows data to be modeled and viewed in multiple dimensions Dimension tables, such as item (item_name, brand, type), or time(day, week, month, quarter, year) Fact table contains measures (such as dollars_sold) and keys to each of the related dimension tables May 27, 2014 Data Mining: Concepts and Techniques 7

  8. Cube: A Lattice of Cuboids all 0-D(apex) cuboid time item location supplier 1-D cuboids time,location item,location location,supplier 2-D cuboids time,supplier item,supplier time,location,supplier 3-D cuboids item,location,supplier time,item,supplier 4-D(base) cuboid time,item time,item,location time, item, location, supplier May 27, 2014 Data Mining: Concepts and Techniques 8

  9. A Concept Hierarchy: Dimension (location) all all Europe ... North_America region Germany ... Spain Canada ... Mexico country Vancouver ... city Frankfurt ... Toronto L. Chan ... M. Wind office May 27, 2014 Data Mining: Concepts and Techniques 9

  10. A Sample Data Cube Date 2Qtr 1Qtr sum 3Qtr 4Qtr TV Product U.S.A PC VCR sum Canada Country Mexico sum All, All, All Total annual sales of TV in U.S.A. May 27, 2014 Data Mining: Concepts and Techniques 10

  11. Cuboids Corresponding to the Cube all 0-D(apex) cuboid country product date 1-D cuboids product,date product,country date, country 2-D cuboids 3-D(base) cuboid product, date, country May 27, 2014 Data Mining: Concepts and Techniques 11

  12. Data Cube Example (continued) • The following figure table shows one of the two dimensional aggregates, along with two of the one-dimensional aggregates, and the overall total

  13. OLAP Operations: Slicing and Dicing • Slicing is selecting a group of cells from the entire multidimensional array by specifying a specific value for one or more dimensions. • Dicing involves selecting a subset of cells by specifying a range of attribute values. • This is equivalent to defining a subarray from the complete array. • In practice, both operations can also be accompanied by aggregation over some dimensions.

  14. OLAP Operations: Roll-up and Drill-down • This hierarchical structure gives rise to the roll-up and drill-down operations. • For sales data, we can aggregate (roll up) the sales across all the dates in a month. • Conversely, given a view of the data where the time dimension is broken into months, we could split the monthly sales totals (drill down) into daily sales totals. • Likewise, we can drill down or roll up on the location or product ID attributes.

More Related