Data Base
Data Base
Lecture-11
Dimensional Modeling (DM)
1
Dimensional Modeling (DM)
2
The need for ER modeling?
Data redundancies
3
Why ER Modeling has been so successful?
Coupled with normalization drives out all
the redundancy out of the database.
Some Observations:
All tables look-alike, as a consequence it is difficult to
identify:
3 2 5
2 5 4
De-Normalization
9
What is DM?…
A simpler logical model optimized for decision
support.
11
Dimensions have Hierarchies
Items
Books Cloths
Engg Medical
12
The two Schemas
Star
Snow-flake
13
“Simplified” 3NF (Retail)
CITY DISTRICT M DIVISIONPROVINCE
1 district BACK
1 1
zone M division
M DISTRICT DIVISION
ZONE CITY
1
store M week
1
STORE #STREET ZONE ... DATE WEEK
1 M
sale_header M quarter
M
RECEIPT #STORE # DATE ... MONTH QTR
1 1
M M
1
WEEK MONTH
M sale_detail month 1
RECEIPT # ITEM # ... $
YEAR QTR
1 M M
1 year
ITEM #CATEGORY
ITEM # SUPPLIER
item_x_cat M
1 item_x_splir
CATEGORY DEPT
14
cat_x_dept
Vastly Simplified Star Schema
Product Dim
Geography Dim
1 ITEM#
STORE# 1
Fact Table CATEGORY
ZONE
RECEIPT#
DEPT
CITY
STORE#
M SUPPLIER
DISTRICT
ITEM# M
DIVISION
DATE Time Dim
M
PROVINCE . DATE
. 1
facts . WEEK
QUARTER
YEAR
15
The Benefit of Simplicity
16
Features of Star Schema
Dimensional hierarchies are collapsed into a single
table for each dimension. Loss of Information?
A single fact table created with a single header from the detail
records, resulting in: