Professional Documents
Culture Documents
Confidential L&T
22 Oct 07 |1 |usha
Agenda
Some basics
Why do we need dimension modeling?
Difference between ER / DM
How to start?
Four step Dimensional Design
Types of Grains in Fact Table
About the Modeling Techniques
Slowly Changing Dimension
Some Best Practices
22 Oct 07 |2 |usha v
Some Basics
Fact and dimensions
Fact Table : It is the primary table where the numeric performance measures of
the business are stored
Dimension Tables : These are integral companions to a fact table. They contain
textual descriptors of the business.
A measure (e.g. sales amount, qty, etc) It is numeric measurement in a fact
table.
Each measure depends on a set of dimensions (e.g. sales volume as a function
of product, time, and location)
Each dimension can have a set of associated attributes
For each dimension, the set of associated attributes can be structured as a
hierarchy Normalization and De Normalization
22 Oct 07 |3 |usha v
Date Dimension
Date
Month
Year
Store Dimension
StoreID
City
State
Country
Region
es
r
u
as
Me
Confidential L&T Infotech
ProductNo
ProdName
ProdDesc
Category
QOH
At
tr
s
ibu
te
Customer Dimension
CustId
CustName
CustCity
CustCountry
schilling_sales
22 Oct 07 |4 |usha v
Customer
City
Region
City
State
Country
22 Oct 07 |5 |usha v
ER Model
One table per entity
Minimize data
redundancy
Optimize update
The Transaction
Processing Model
Dimension Modeling
One fact table for data
organization
Maximize
understandability
Optimized for retrieval
The data warehousing
model
Lesser Joins between
tables when compared
with the ER
22 Oct 07 |6 |usha v
Study the
source
tables
Given by
the client
Apply the
dimensiona
l
techniques
Provide
the model
22 Oct 07 |7 |usha v
22 Oct 07 |8 |usha v
Types of Grains
The TRANSACTION grain,
22 Oct 07 |9 |usha v
Modeling Techniques
Star Model View
Best Practices
Star Model
Product_ Dim
Product_Id
Other Descriptors
Customer_Dim
Sales Fact
Customer_Id
Other Descriptors
Customer_Id
Product_Id
Representative_Id
Date_Id
Quantity_Sold
Sales_Amount
Date_Dim
Representative_Dim
Date_Id
Other Descriptors
Representative_Id
Other Descriptors
prodId
p1
p2
name price
bolt
10
nut
5
customer
custId
53
81
111
store
custId
53
53
111
name
joe
fred
sally
prodId
p1
p2
p1
storeId
c1
c1
c3
address
10 main
12 main
80 willow
qty
1
2
5
storeId
c1
c2
c3
city
nyc
sfo
la
amt
12
11
50
city
sfo
sfo
la
Multidimensional Cube
Fact relation
sale
Product Client
p1
c1
p2
c1
p1
c3
p2
c2
p1
c1
p1
c2
Date
1
1
1
1
2
2
3-dimensional cube
Amt
12
11
50
8
44
4
day 2
day 1
p1
p2 c1
p1
12
p2
11
c1
44
c2
4
c2
c3
c3
50
Back
Confidential L&T Infotech
Product_ Dim
Product_Id
Other Descriptors
Sales Fact
Customer_Id
Product_Id
Representative_Id
Date_Id
Quantity_Sold
Sales_Amount
Customer_Id
Country_Id
Other Descriptors
Country_Dim
Country_Id
Other Descriptors
Date_Dim
Representative_Dim
Date_Id
Other Descriptors
Representative_Id
Other Descriptors
Back
Bridge Table
Diagnosis Group Helper Table
Patient Billing Fact Table
Date_Key
Patient_Key
Doctor_Key
Service_Key
Diagnosis_Group
Billed_Amount
Diagnosis_Group
Diagnosis_Key
Weighting factor
Diagnosis Dimension
Diagnosis_Key
Description
Type
Category
Date_Dim
StudentFacultyBridge_Id
Faculty_Id
Other Descriptors
Date_Id
Other Descriptors
Faculty_Dim
Faculty_Id
Other Descriptors
Location_Dim
Institution_Dim
Institution_Id
Other Descriptors
StudentLocationBridge_Id
Location_Id
Other Descriptors
Location_Id
Other Descriptors
Back
Factless Fact
Requirement Dim
Requirement Fact
Technology Dim
SBU Dim
Date Dim
Interview Fact
Candidate Dim
Source Dim
Status Dim
Accept/Decline Dim
Interview Dim
Reasons Dim
Thank You