Docsity

Dimensional Modeling Part 3-Data Warehouse-Lecture Slides, Slides of Data Warehousing

Partial preview of the text

Download Dimensional Modeling Part 3-Data Warehouse-Lecture Slides and more Slides Data Warehousing in PDF only on Docsity!

Chapter 4: Data Warehousing and On-line

Analytical Processing

Data Warehouse: Basic Concepts

Data Warehouse Modeling: Data Cube and OLAP

Data Warehouse Design and Usage

Data Warehouse Implementation

Data Generalization by Attribute-OrientedInduction

Summary

docsity.com

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 inmultiple 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

docsity.com

Example of Star Schema

time time_keydayday_of_the_weekmonthquarteryear

locationlocation_keystreetcitystate_or_provincecountry

Sales Fact Table

time_keyitem_key

branch_key

location_key

units_sold

dollars_sold

avg_sales

Measures

item_keyitem_namebrandtypesupplier_type

item

branchbranch_keybranch_namebranch_type

docsity.com

2D – View of Sales Data

July 19, 2012
Data Mining: Concepts and Techniques

The measure displayed is dollars sold (in thousands)

docsity.com

Data Cube – 3D

July 19, 2012
Data Mining: Concepts and Techniques

docsity.com

Data Cube – 4D

July 19, 2012
Data Mining: Concepts and Techniques

docsity.com

Cube: A Lattice of Cuboids

time,item time,item,location

time, item, location, supplier

all

time

item

location

supplier

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 cuboids2-D cuboids3-D cuboids4-D (

base

) cuboid

docsity.com

Concept Hierarchies

A sequence of mappings from a set of low-levelconcepts to higher-level, more general concepts

July 19, 2012
Data Mining: Concepts and Techniques

docsity.com

A Concept Hierarchy:Dimension (location)

all

Europe

North_America

Mexico

Canada

Spain

Germany

Vancouver

M. Wind

L. Chan

...

...

... ...

...

...

all region country office

Toronto

Frankfurt

city

docsity.com

Concept Hierarchies

Total Order:street < city < province or state < country

Partial Order:day < {month <quarter; week} < year

July 19, 2012
Data Mining: Concepts and Techniques

docsity.com

A Sample Data Cube

Total annual salesof TVs in U.S.A.

Date

Country

sum

sum

TV

VCR

PC

1Qtr

2Qtr

3Qtr

4Qtr

U.S.A CanadaMexico

sum

docsity.com

Cuboids Corresponding to the Cube

all

product

date

country

product,date

product,country

date, country

product, date, country

0-D (

apex

) cuboid

1-D cuboids2-D cuboids3-D (

base

) cuboid

docsity.com

July 19, 2012
Data Mining: Concepts and Techniques

docsity.com

Q1Q2Q3Q

1000

Canada

USA

2000

time (quarters)

location (countries)

home entertainment

computer^ item (types)

phone

security

Toronto

395

Q1Q

605

Vancouver

time

(quarters)

location (cities)

home entertainment

computer item (types)

JanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember

Chicago New York Toronto Vancouver location (cities) time (months)

home entertainment

computer^ item (types)

phone

(^150100150) security

605

825

14

400

Q1Q2Q3Q

Chicago New York Toronto Vancouver

time (quarters)

location (cities)

home entertainment

computer^ item (types)

phone

security 440

395

1560

dice

for (location = “Toronto” or “Vancouver”)and (time = “Q1” or “Q2”) and(item = “home entertainment” or “computer”)

roll-up on location(from citiesto countries)

slice for time = “Q1”

ChicagoNew YorkTorontoVancouver

home entertainment

computer^ item (types)

phone

security

location (cities)

605

825

14

400

homeentertainmentcomputerphonesecurity

60582514400

Chicago

New York location (cities)

item (types)

Toronto

Vancouver

pivot

drill-down on time(from quartersto months)

Fig. 3.10 Typical OLAPOperations

docsity.com