Lecture 6
Lecture 6
1
Business Intel
DS-308
Course Instructor: Hamza Ali
2 Lecture 6
Dimensional Modelling
Outline:
Design DWH
Background (ER Modelling)
Dimension Modelling
Star Schemas
3
Designing DW
CLERK PROMOTION
clerk_key (PK) promotion_key (PK)
clerk_id promotion_name
clerk_name price_type
clerk_grade ad_type
Inside Dimensional Modeling
10 Inside Dimension table
• Key attribute of dimension table, for identification
• Large no of columns, wide table
• Non-calculated attributes, textual attributes
• Attributes are not directly related (e.g., brand and
package size)
Inside Dimensional Modeling
11 Inside Dimension table (cont.…)
• Un-normalized in Star schema
• Ability to drill-down and roll-up are two ways of
exploiting dimensions
• Can have multiple hierarchies (product category for
marketing and product category for accounting)
• Relatively small number of records
12
Inside Dimensional Modeling
Have two types of attributes
• Key attributes, for connections
• Facts
Inside fact table
• Concatenated key
• Grain or level of data identified
• Large number of records
• Limited attributes
• Sparse data set
• Degenerate dimensions (order number Average products per
order)
Fact-less fact table
13
Star Schema Keys
Surrogate keys in Dimension tables
• Replacement of primary key
• System generated
Foreign keys in Fact tables
• Collection of primary keys of dimension tables
Primary key in fact table
• Collection of P.Ks came from dimension tables
• Maybe degenerated dimension
• Maybe system generated surrogate key
14
Advantage of Star Schema
Ease for users to understand
Optimized for navigation (less joins fast)
Most suitable for query processing (drill-down, roll-
up)
Special techniques for join and indexing for further
query optimization
Questions?????