fact table the fact table stores business events. the attributes explain the conditions of the...
TRANSCRIPT
![Page 1: Fact Table The fact table stores business events. The attributes explain the conditions of the entity at the time the business event happened](https://reader036.vdocument.in/reader036/viewer/2022082713/5697bfaf1a28abf838c9d280/html5/thumbnails/1.jpg)
Designing the Dimensional Data
![Page 2: Fact Table The fact table stores business events. The attributes explain the conditions of the entity at the time the business event happened](https://reader036.vdocument.in/reader036/viewer/2022082713/5697bfaf1a28abf838c9d280/html5/thumbnails/2.jpg)
Fact TableThe fact table stores business events. The attributes explain the conditions of the
entity at the time the business event happened.
![Page 3: Fact Table The fact table stores business events. The attributes explain the conditions of the entity at the time the business event happened](https://reader036.vdocument.in/reader036/viewer/2022082713/5697bfaf1a28abf838c9d280/html5/thumbnails/3.jpg)
Dimension TableA dimension table is a table that contains :
Various attributes explaining the dimension key in the fact table.
The conditions of the entities involved in the business event stored in the fact table.
The attributes are stored as columns in the dimension tables.
They are known as dimensional attributes.
![Page 4: Fact Table The fact table stores business events. The attributes explain the conditions of the entity at the time the business event happened](https://reader036.vdocument.in/reader036/viewer/2022082713/5697bfaf1a28abf838c9d280/html5/thumbnails/4.jpg)
Dimension TableA dimension table is a table that contains
various attributes explaining the dimension key in the fact table.
Degenerate dimension : is a dimension with only one attribute, and therefore the attribute is put in the fact table.Identifier in the source system
Timestamp column: the time when the record was loaded into the fact tableWhen the fact row (or dimension row) was
loaded into data warehouse data store.
![Page 5: Fact Table The fact table stores business events. The attributes explain the conditions of the entity at the time the business event happened](https://reader036.vdocument.in/reader036/viewer/2022082713/5697bfaf1a28abf838c9d280/html5/thumbnails/5.jpg)
The users will be using the data warehouse to do analysis in six business areas: product sales, subscription sales, subscriber profitability, supplier performance, CRM campaign segmentation, and CRM campaign results.
![Page 6: Fact Table The fact table stores business events. The attributes explain the conditions of the entity at the time the business event happened](https://reader036.vdocument.in/reader036/viewer/2022082713/5697bfaf1a28abf838c9d280/html5/thumbnails/6.jpg)
Product SalesA product sales event happens when a customer
is buying a product, rather than subscribing to a package.
The roles (the who, where, and what) in this event are the customer, product, and store.
The levels (or in dimensional modeling terms, the measures) are the quantity, unit price, value, direct unit cost, and indirect unit cost.
Put the measures in the fact table and the roles (plus dates) in the dimension tables.
The business events become the fact table row.
![Page 7: Fact Table The fact table stores business events. The attributes explain the conditions of the entity at the time the business event happened](https://reader036.vdocument.in/reader036/viewer/2022082713/5697bfaf1a28abf838c9d280/html5/thumbnails/7.jpg)
Product Sales fact table and its dimensions
![Page 8: Fact Table The fact table stores business events. The attributes explain the conditions of the entity at the time the business event happened](https://reader036.vdocument.in/reader036/viewer/2022082713/5697bfaf1a28abf838c9d280/html5/thumbnails/8.jpg)
quantity, unit_price, and unit_cost measures are derived from the source system.
But other three measures (sales_value, sales_cost, and margin) are calculated.
They are defined as follows:sales_value = unit_price * quantisales_cost = unit_cost * quantitymargin = sales_value – sales_cost
The four keys in the Product Sales fact table link the fact table with the four dimensions.
![Page 9: Fact Table The fact table stores business events. The attributes explain the conditions of the entity at the time the business event happened](https://reader036.vdocument.in/reader036/viewer/2022082713/5697bfaf1a28abf838c9d280/html5/thumbnails/9.jpg)
GrainGrain is the smallest unit of occurrence of the
business event in which the event is measured.
In other words, grain is completing this sentence: “One row in the fact table corresponds to. . . .”
In this case, the grain is each item sold—one row in the Product Sales fact table corresponds to each item sold.
Simple measure: sales value, sales cost, margin
![Page 10: Fact Table The fact table stores business events. The attributes explain the conditions of the entity at the time the business event happened](https://reader036.vdocument.in/reader036/viewer/2022082713/5697bfaf1a28abf838c9d280/html5/thumbnails/10.jpg)
Product Sales table (and its dimensions) with timestamp columns
![Page 11: Fact Table The fact table stores business events. The attributes explain the conditions of the entity at the time the business event happened](https://reader036.vdocument.in/reader036/viewer/2022082713/5697bfaf1a28abf838c9d280/html5/thumbnails/11.jpg)