You are on page 1of 65

Course: 7023T - Advanced Database Systems

Dimensional Design (Cont’d)


Session 9
Learning Outcomes
Understand the purpose of the development life
cycle and how this cycles relates to the database
ware house development lifecycle. To describe
the activities associates with each stage of the
database ware house lifecycle. To introduce the
dimensional modelling, a high-level conceptual
data model, and to discuss the usefulness of this
modelling technique in the data warehouse
design.
Bina Nusantara University 3
Acknowledgements
These slides have been adapted from Kimball,
Ralph & Ross, Margy. (1998). The Data
Warehouse Life Cycle Toolkit: Expert Methods
for Designing, Developing, and Deploying Data
Warehouse. Second edition. John Wiley & Sons.
New York

Bina Nusantara
Outline Materi
Dimensional Design
• Degenerate Transaction Number
Dimension
• Schema in Action
• Schema Extensibility
• Dimension Normalization (Snowflaking)
• Surrogate Keys

5
Bina Nusantara
Extended Dimension Table Designs
• Many-to-Many Dimensions

6
Bina Nusantara
schema with a diagnosis dimension that can take only one value at a time

Bina Nusantara University


7
Solving the multiple diagnosis problem with a diagnosis group bridge table

Bina Nusantara University


8
Solving the multiple customers per account problem
with an account- to-customer bridge table
Bina Nusantara University
9
Extended Dimension Table Designs
• Many-to-Many Dimensions
• Many-to-One-to-Many Traps

10
Bina Nusantara
A many-to-one-to-many schema that should not be queried with one
SELECT statement
Bina Nusantara University
11
Extended Dimension Table Designs
• Many-to-Many Dimensions
• Many-to-One-to-Many Traps
• Role-Playing Dimensions
– A role in a data warehouse is a situation where a
single dimension appears several times in the same
fact table. This can happen in a number of ways. For
instance, in certain kinds of fact tables, time can
appear repeatedly.

12
Bina Nusantara
Extended Dimension Table Designs
• Many-to-Many Dimensions
• Many-to-One-to-Many Traps
• Role-Playing Dimensions
• Organization and Parts Hierarchies

13
Bina Nusantara
Organization and Parts Hierarchies

A schematic diagram of a set of parent companies and subsidiaries,


all of whom may be customers
Bina Nusantara University
14
Organization and Parts Hierarchies

A commercial customer dimension with


a recursive parent customer key link
Bina Nusantara University
15
Organization and Parts Hierarchies

A commercial customer dimension with a navigation bridge table


that allows natural SQL reporting at all levels of the tree
Bina Nusantara University
16
Organization and Parts Hierarchies

This different configuration of joins between the navigation bridge


table and the other tables is used to climb up the tree
Bina Nusantara University
17
Extended Dimension Table Designs
• Many-to-Many Dimensions
• Many-to-One-to-Many Traps
• Role-Playing Dimensions
• Organization and Parts Hierarchies
• Unpredictably Deep Hierarchies

18
Bina Nusantara
Organization and Parts Hierarchies

A manufacturing profile subdimension is used to model an


unpredictably deep hierarchy
Bina Nusantara University
19
Extended Dimension Table Designs
• Many-to-Many Dimensions
• Many-to-One-to-Many Traps
• Role-Playing Dimensions
• Organization and Parts Hierarchies
• Unpredictably Deep Hierarchies
• Time Stamping the Changes in a Large
Dimension

20
Bina Nusantara
Organization and Parts Hierarchies

A model for a human resources environment with an employee


transaction dimension time stamped with current and next
Bina Nusantara University
transaction dates and times
21
Extended Dimension Table Designs
• Many-to-Many Dimensions
• Many-to-One-to-Many Traps
• Role-Playing Dimensions
• Organization and Parts Hierarchies
• Unpredictably Deep Hierarchies
• Time Stamping the Changes in a Large
Dimension
• Building an Audit Dimension

22
Bina Nusantara
Organization and Parts Hierarchies

An audit dimension can be used to accurately track the lineage of


individual records in the fact table
Bina Nusantara University
23
Extended Dimension Table Designs
• Many-to-Many Dimensions
• Many-to-One-to-Many Traps
• Role-Playing Dimensions
• Organization and Parts Hierarchies
• Unpredictably Deep Hierarchies
• Time Stamping the Changes in a Large
Dimension
• Building an Audit Dimension
• Too Few Dimensions and Too Many
Dimensions 24
Bina Nusantara
Extended Fact Table Designs
• Facts of Differing Granularity and
Allocating

25
Bina Nusantara
Organization and Parts Hierarchies

A shipment invoices fact table showing how a full view of profitability


Bina Nusantara University
can be expressed at the invoice line item level by allocating costs to
26
the lowest level
Organization and Parts Hierarchies

When an aggregate table and a plan table share exactly the same
Bina Nusantara University dimensions, it may be reasonable to combine them into a single 27
physical table
Organization and Parts Hierarchies

A plan table with an extra dimension (plan version) that makes it


Bina Nusantara University
impossible to combine with an aggregate table 28
Organization and Parts Hierarchies

A fact table with facts at the wrong grain


Bina Nusantara University
29
Extended Fact Table Designs
• Facts of Differing Granularity and
Allocating
• Time of Day

30
Bina Nusantara
Organization and Parts Hierarchies

A sales fact table with transaction time recorded to the minute and
Bina Nusantara University
split off from the transaction date 31
Organization and Parts Hierarchies

A sales fact table spanning multiple time zones where comparing


Bina Nusantara University
comparable telesales across time zones is required 32
Extended Fact Table Designs
• Facts of Differing Granularity and
Allocating
• Time of Day
• Multiple Units of Measure

33
Bina Nusantara
Organization and Parts Hierarchies

The wrong design when fact table quantities need to be expressed


in several units of measure
Bina Nusantara University
34
Organization and Parts Hierarchies

The recommended design for multiple units of measure places the


Bina Nusantara University conversion factors directly in the fact table record to eliminate the 35
possibility of choosing the wrong factors
Extended Fact Table Designs
• Facts of Differing Granularity and
Allocating
• Time of Day
• Multiple Units of Measure
• Multinational Currency Tracking

36
Bina Nusantara
Organization and Parts Hierarchies

Tracking transactions in multiple currencies requires a daily


Bina Nusantara University
currency exchange conversion fact table 37
Extended Fact Table Designs
• Facts of Differing Granularity and
Allocating
• Time of Day
• Multiple Units of Measure
• Multinational Currency Tracking
• Value Band Reporting

38
Bina Nusantara
Organization and Parts Hierarchies

Arbitrary value band reporting can be done with a band definition


Bina Nusantara University table and a pair of nonequijoins 39
Advanced ROLAP Querying and Reporting
• Drill-Across Queries with Multiple
Technologies

40
Bina Nusantara
Organization and Parts Hierarchies

The query architecture for disparate conformed data sources

Bina Nusantara University


41
Advanced ROLAP Querying and Reporting
• Drill-Across Queries with Multiple Technologies
• Self Referencing Queries, Behavior Tracking, and
Sequential Subsetting
1. Simple constraints
2. Simple subqueries
3. Correlated subqueries
4. Simple behavioral queries
5. Derived behavioral queries
6. Progressive subsetting queries.
7. Classification queries
42
Bina Nusantara
Organization and Parts Hierarchies

A special behavior dimension consisting only of keys of some


selected dimension can be attached directly to any fact table
containing that dimension’s keys
Bina Nusantara University
43
Advanced ROLAP Querying and Reporting
• Drill-Across Queries with Multiple Technologies
• Self Referencing Queries, Behavior Tracking, and
Sequential Subsetting
• Market Basket Analysis

44
Bina Nusantara
Organization and Parts Hierarchies

A market basket fact table populated from a sales fact table,


showing the product keys that must be generalized to handle either
base-level products or aggregate-level products, in any mixture
Bina Nusantara University
45
Acknowledgements
These slides have been adapted from Kimball,
Ralph & Ross, Margy. (1998). The Data
Warehouse Life Cycle Toolkit: Expert Methods
for Designing, Developing, and Deploying Data
Warehouse. Second edition. John Wiley & Sons.
New York

Bina Nusantara
Outline Materi
Dimensional Design
• Degenerate Transaction Number
Dimension
• Schema in Action
• Schema Extensibility
• Dimension Normalization (Snowflaking)
• Surrogate Keys

47
Bina Nusantara
Matrix Method for Getting Started
• Build the Matrix
– Do the Necessary Homework
– List the Data Marts
– List the Dimensions
– Mark the Intersections

48
Bina Nusantara
The Data Warehouse Bus Architecture matrix
for a telephone company
Bina Nusantara University
49
Use the Four-Step Method to Design Each
Fact Table
• Step 1. Choose the Data Mart
• Step 2. Declare the Grain
• Step 3. Choose the Dimensions
• Step 4. Choose the Facts

50
Bina Nusantara
Managing the Dimensional Modeling Project

• Data Warehouse Bus Architecture Matrix


• Fact Table Diagram

51
Bina Nusantara
The telephone billing fact table diagram.
Disconnected dimensions are shown on both sides of the diagram
Bina Nusantara University
52
Managing the Dimensional Modeling Project

• Data Warehouse Bus Architecture Matrix


• Fact Table Diagram: serves multiple
communications purposes
– Link between IS and users
– Help with data access tool selection
– End user training

53
Bina Nusantara
Managing the Dimensional Modeling Project

• Data Warehouse Bus Architecture Matrix


• Fact Table Diagram
• Fact Table Detail

54
Bina Nusantara
Fact table detail diagram showing dimension keys,
basic facts, and derived facts (with asterisks)
Bina Nusantara University
55
Managing the Dimensional Modeling Project

• Data Warehouse Bus Architecture Matrix


• Fact Table Diagram
• Fact Table Detail
• Dimension Table Detail

56
Bina Nusantara
Dimension table detail diagram
(relative cardinalities shown in parentheses)
Bina Nusantara University
57
Managing the Dimensional Modeling Project
• Data Warehouse Bus Architecture Matrix
• Fact Table Diagram
• Fact Table Detail
• Dimension Table Detail
– Attribute name
– Attribute definition
– Cardinality
– Sample data
– Slowly changing policy
– Many-to-many relationships
– Slowly changing dimensions
– Artificial attributes 58
Bina Nusantara
Many-to-many and slowly changing dimension attributes

Bina Nusantara University


59
A dimension with a correlated attribute

Bina Nusantara University


60
Managing the Dimensional Modeling Project
• Data Warehouse Bus Architecture Matrix
• Fact Table Diagram
• Fact Table Detail
• Dimension Table Detail
• Steps for the Dimensional Modeling Team
– Create the Initial Draft
– Track Base Facts and Derived Facts
– Get IS Team Input
– Work with Core Business Users
– Present to Business Users

61
Bina Nusantara
Managing the Dimensional Modeling Project
• Data Warehouse Bus Architecture Matrix
• Fact Table Diagram
• Fact Table Detail
• Dimension Table Detail
• Steps for the Dimensional Modeling Team
• Identifying the Sources for Each Fact Table and
Dimension Table

62
Bina Nusantara
Managing the Dimensional Modeling Project
• ….
• Identifying the Sources for Each Fact Table and
Dimension Table
– Understanding Candidate Data Sources
– Source Data Ownership
– Data Providers
– Detailed Criteria for Selecting the Data Sources
– Customer Matching and Householding
– Browsing the Data Content
– Mapping Data from Source to Target
63
Bina Nusantara
Managing the Dimensional Modeling Project
• …….
• Using a Data Modeling Tool
– Estimating the Number of Rows
– Designing for Aggregation
– Deciding What to Aggregate

64
Bina Nusantara
Managing the Dimensional Modeling Project
• Data Warehouse Bus Architecture Matrix
• Fact Table Diagram
• Fact Table Detail
• Dimension Table Detail
• Steps for the Dimensional Modeling Team
• Identifying the Sources for Each Fact Table and
Dimension Table
• When Are You Done?
• Using a Data Modeling Tool
65
Bina Nusantara

You might also like