Lecture: Lecture 02 - Introduction to Data Warehousing
Core idea
A relational star schema implements the dimensional view using tables. The central fact table stores measurements and references to their context; surrounding dimension tables describe products, shops and dates. Joining these tables lets an analyst group numerical results by meaningful business attributes.
Structure (pages 11-12)
The source’s sales example places Sale at the center, connected to Shop, Product and Date. Numerical measures belong in the fact table. Dimensions carry descriptive attributes that explain those measurements.
Added table example
| Product ID | Shop ID | Date ID | Quantity | Revenue |
|---|---|---|---|---|
| P1 | S1 | D1 | 100 | EUR 150 |
The Product dimension might describe P1 as milk, with a brand and a dairy category. Shop describes S1’s city and region. Date describes D1’s month, quarter and year. These attributes are added examples, not a copied schema specification.
The IDs connect measurement records to their descriptions. A fact table is the table of measurement records; a measure such as revenue is a value within those records. Numeric identifiers can also occur in dimensions, so a column’s numeric type alone does not make it a measure.
How the structure supports a query
To calculate September revenue for Berlin, identify the appropriate date and shop records, find matching facts, and sum their revenue. Product categories can group individual products into broader summaries.
Historical category changes require an explicit interpretation: analysis using the category at the time of sale differs from reclassifying history under the current category. This is an added design question; the source does not teach a full historical-dimension implementation.
Related: Dimensions Measures and Fact Grain, Warehouse Metadata and Lineage.
Source
Elena Baralis, Data warehouse - Introduction, Politecnico di Torino, DBMG, local DSTBD_2-DWintro-EN.pdf, 27 PDF pages. References use PDF page order. Original PDF and figures remain local under the source copyright notice. Added examples and qualifications are study explanations. Relevant pages: 11-12.
Exam practice and transfer
Worked scenario
A university warehouse is being designed around star schemas and fact tables. Start with one concrete business question, identify the facts and context required, and explain what would be lost or misinterpreted if the representation were chosen incorrectly.
Concrete example
A sales fact table stores quantity and revenue plus keys to Date, Product and Shop dimensions. Analysts can group revenue by month or product category without copying descriptions into every fact row.
Retrieval questions
- Explain Star Schemas and Fact Tables in your own words, then identify the problem it prevents in a real data project.
- Give a small example that would violate the concept, and explain how the violation would distort an analysis or query.
- Compare this concept with the nearest related idea in the note and state when each should be used.
These prompts are added study practice. They require explanation and transfer rather than copying a definition.