Docsity

Data Mining - Multi - dimensional data model, Study notes of Data Mining

Toggle sidebar
bg1
November 26, 2014 Data Mining: Concepts and
Techniques 1
Chapter 3: Data Warehousing
and OLAP Technology: An
Overview
•What is a data warehouse?
•A multi-dimensional data model
•Data warehouse architecture
•Data warehouse implementation
•From data warehousing to data mining
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15

Partial preview of the text

Download Data Mining - Multi - dimensional data model and more Study notes Data Mining in PDF only on Docsity!

November 26, 2014 Data Mining: Concepts and 1

Chapter 3: Data Warehousing

and OLAP Technology: An

Overview

  • (^) What is a data warehouse?
  • (^) A multi-dimensional data model
  • (^) Data warehouse architecture
  • (^) Data warehouse implementation
  • (^) From data warehousing to data mining

November 26, 2014 Data Mining: Concepts and 2

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
  • (^) In data warehousing literature, an n-D base cube is called a base cuboid. The top most 0-D cuboid, which holds the highest-level of summarization, is called the apex cuboid. The lattice of cuboids forms a data cube.

November 26, 2014 Data Mining: Concepts and 4

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

November 26, 2014 Data Mining: Concepts and 5

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

November 26, 2014 Data Mining: Concepts and Techniques 7

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

November 26, 2014 Data Mining: Concepts and 8

Cube Definition Syntax (BNF) in

DMQL

  • (^) Cube Definition (Fact Table) define cube <cube_name> [<dimension_list>]: <measure_list>
  • (^) Dimension Definition (Dimension Table) define dimension <dimension_name> as (<attribute_or_subdimension_list>)
  • (^) Special Case (Shared Dimension Tables)
    • (^) First time as “cube definition”
    • (^) define dimension <dimension_name> as <dimension_name_first_time> in cube <cube_name_first_time>

November 26, 2014 Data Mining: Concepts and 10

Defining Snowflake Schema in

DMQL

define cube sales_snowflake [time, item, branch, location]: dollars_sold = sum(sales_in_dollars), avg_sales = avg(sales_in_dollars), units_sold = count(*) define dimension time as (time_key, day, day_of_week, month, quarter, year) define dimension item as (item_key, item_name, brand, type, supplier(supplier_key, supplier_type)) define dimension branch as (branch_key, branch_name, branch_type) define dimension location as (location_key, street, city(city_key, province_or_state, country))

November 26, 2014 Data Mining: Concepts and 11

Defining Fact Constellation in

DMQL

define cube sales [time, item, branch, location]: dollars_sold = sum(sales_in_dollars), avg_sales = avg(sales_in_dollars), units_sold = count() define dimension time as (time_key, day, day_of_week, month, quarter, year) define dimension item as (item_key, item_name, brand, type, supplier_type) define dimension branch as (branch_key, branch_name, branch_type) define dimension location as (location_key, street, city, province_or_state, country) define cube shipping [time, item, shipper, from_location, to_location]: dollar_cost = sum(cost_in_dollars), unit_shipped = count() define dimension time as time in cube sales define dimension item as item in cube sales define dimension shipper as (shipper_key, shipper_name, location as location in cube sales, shipper_type) define dimension from_location as location in cube sales define dimension to_location as location in cube sales

November 26, 2014 Data Mining: Concepts and 13

A Concept Hierarchy: Dimension

(location)

all Europe North_America Germany Spain Canada Mexico Vancouver L. Chan M. Wind ... ... ... ... ... ... all region office country city Frankfurt Toronto

November 26, 2014 Data Mining: Concepts and 14

View of Warehouses and

Hierarchies

Specification of hierarchies
  • Schema hierarchy
day < {month < quarter;
week} < year
  • Set_grouping hierarchy
{1..10} < inexpensive

November 26, 2014 Data Mining: Concepts and 16

A Sample Data Cube

Total annual sales of TV in U.S.A. Date Product Country sum sum TV VCR

PC

1Qtr 2Qtr^ 3Qtr (^) 4Qtr U.S.A Canada Mexico sum

November 26, 2014 Data Mining: Concepts and 17

Cuboids Corresponding to the

Cube

all product (^) date country product,date product,country date, country product, date, country 0-D(apex) cuboid 1-D cuboids 2-D cuboids 3-D(base) cuboid

November 26, 2014 Data Mining: Concepts and 19

Typical OLAP Operations

  • (^) 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)

November 26, 2014 Data Mining: Concepts and 20 Fig. 3.10 Typical OLAP Operations