3. 3
Decision Support Systems (DSS)
What is a Dimension?
What is a Fact?
What is Dimensional Modeling?
Data Warehouse Schemas
4. 4
What is a Dimension?
Data Warehouse is
• Subject-Oriented
•
•Integrated
• Time-Variant
• Non-volatile
collection of data in support of management’s decision.
Subject Dimension
Customer
Geography
Time
5. 5
Dimensional Hierarchy
World
America Asia
Europe
USA
FL
Canada Argentina
GA VA CA WA
Tampa
Miami Orlando Naples
Continent Level
State Level
City Level
World Level
Country Level
Dimension Member /
Business Entity
Attributes: Population,
Tourist’s Place
Geography Dimension
6. 6
Types of Dimensions
•Simple Dimensions (e.g. Time)
• Related Dimensions (e.g. Gender of a Customer)
• Spool Dimensions (e.g. Account as an interaction between Customer and Product)
• Bucket Dimensions (e.g. Income Ranges of a Customer)
• Slowly Changing Dimensions (e.g. changes in Organization)
• Fast Varying Dimensions (e.g. changes Retail Customers attributes)
• Unused Dimensions (e.g. Order No., Invoice No.)
7. 7
Slowly Changing Dimension (SCD)
Various data elements in the dimension undergo
changes (e.g. changes in attributes, hierarchical
structures) which need to be captured for analysis.
E.g. Sales Person XYZ moves from Department A to
B on dd/mm/yyyy. How to allocate the revenue
generated by XYZ to appropriate department?
8. 8
Slowly Changing Dimension (SCD) - Solutions
Possible Solutions to SCD issue:
• New Changes Only
• First Information Only
• Tracking Changes along the History
New and Previous Information
Entire Set of Changes
using
Primary Key + Timestamp
using
Surrogate Key
9. 9
What is a Fact?
Fact Measure
Revenue Cost
No. of Accounts
10. 10
Types of Facts
• Numeric Facts
• Count / Occurrence Based (e.g. Employees assigned to a project)
• Non-numeric Facts (e.g. Comments in fact tables)
• Additive (along all dimensions)
• Semi Additive (mostly along Time dimension)
• Non Additive (cannot be added along any dimension)
Summary Based Classification
Value Based Classification
12. 12
Dimensional Modeling
STEP 1
• Identify Subjects (Dimensions)
• Identify Hierarchies of a Dimension
• Identify Attributes of levels in Hierarchies
• Define Grain
Customer
Industry Segment
Industry Type City
State
Country
Fin. Class
13. 13
Dimensional Modeling
STEP 2
• Use KPIs to identify the Facts
• Group the Facts in a logical set
Trans. Amount
No. of Bonds
No. of Transactions
Service Cost
...
Financial
Transactions
No. of Cheques Cleared
No. of Visits to a Branch
No. of DEMAT Transactions
...
Non-Financial
Transactions
14. 14
Dimensional Modeling
STEP 3
• Link the Group of Facts to the Dimensions that
participate in the Facts
Customer
Organization
Time
Product
Channel
Financial
Transactions
15. 15
Dimensional Modeling
STEP 4
• Define Granularity for each Group of Facts
Customer
(Customer)
Organization
(Branch)
Product
(Scheme)
Channel
(Channel)
Time
(Day-Hour)
Financial
Transactions
17. 17
Data Warehouse Schemas
Star Schema
• A Group of Facts connected to Multiple Dimensions
Customer
Organization
Time
Product
Channel
Financial
Transactions
18. 18
Data Warehouse Schemas
Snow-flake Schema (= Extended Star Schema)
• A Group of Facts connected to Dimensions, which are
split across multiple hierarchies and attributes
Customer
Organization
Time Product
Channel
Financial
Transactions
Segment Geography
19. 19
Data Warehouse Schemas
Galaxy Schema
• Multiple Groups of Facts links by few common
dimensions
Fact1
Fact2 Fact3
Dimension2
Dimension1
Dimension4
Dimension5
Dimension3
Dimension7
Dimension6