Professional Documents
Culture Documents
Lecture 10 - DMS
Lecture 10 - DMS
Lecture Agenda
• Design process
• Dim tables
• Fact tables
1
12/5/2023
Dimensional Modeling
2
12/5/2023
Identify the
Identify the Facts
Dimensions
The first step in the design is to decide what business process to model by
combining an understanding of the business requirements with an understanding
of the available source data.
▪ Business processes are the operational activities performed by your
organization.
▪ Business process events generate or capture performance metrics that
translate into facts in a fact table.
▪ Most fact tables focus on the results of a single business process.
3
12/5/2023
Grain
Declaring the grain means specifying exactly what an individual face table row
represents. It provides the answer to the question, ‘How do you describe a single
row in the fact table ?’.
For example:
▪ One row per bank account each month.
▪ One row per scan of an individual product on a customer’s sales transaction.
-> Declaring the grain is a critical step that can’t be taken lightly.
▪ Dimensions provide the “who, what, where, when, why, and how” context
surrounding a business process event.
▪ A dimension should be single valued when associated with a given fact row.
ô Dimension tables are the “SOUL” of the data model
4
12/5/2023
▪ Facts are the measurements that result from a business process event and are
almost always numeric
▪ A single fact table row has a one-to-one relationship to a measurement event
as described by the fact table’s grain
Use Case
10
5
12/5/2023
Point-of-sale (POS)
system
11
11
After the business process has been identified, the design team faces a serious
decision about the granularity. What level of data detail should be made
available in the dimensional model ?
In our case study, the most granular data is an individual product on a POS
transaction.
12
12
6
12/5/2023
After the grain of the fact table has been chosen, the choice of dimensions is
straightforward.
You can ask whether other dimensions can be attributed to the POS
measurements, such as the date of the sale, the store where the sale occurred,
the promotion under which the product is sold, the cashier who handled the
sale, and potentially the method of payment.
13
13
The fourth and final step in the design is to make a careful determination of
which facts will appear in the fact table.
14
14
7
12/5/2023
More details
15
15
Dimensional Modeling
16
8
12/5/2023
17
17
18
18
9
12/5/2023
Dimensional Modeling
19
20
20
10
12/5/2023
Snowflake dimensions
21
21
22
22
11
12/5/2023
23
23
Role-Playing Dimensions
24
24
12
12/5/2023
Role-Playing Dimensions
25
25
26
13
12/5/2023
THANK YOU !
27
14