Course: Data Science and Database Technologies
Professor: Elena Baralis, Politecnico di Torino, DBMG.
Source: Data warehouse design, local DSTBD_3-DWprogConcLog-EN.pdf, 47 PDF pages.
Lecture date: not supplied. Documentation date: 23 October 2026. 03 preserves the source filename identifier rather than a confirmed lecture date.
Lecture summary
The introduction explained why analytical data needs a warehouse. Design now starts from the questions to support: establish sufficient evidence, model grouping and history correctly, then choose tables that preserve the intended analysis.
Begin with business questions and available evidence rather than tables. Requirements define events, measures, dimensions, history and refresh needs. Reconciliation connects source meanings; conceptual, logical, physical and feeding design turn the agreed requirements into a warehouse that can actually support them. Warehouse Requirements and Design Lifecycle
The Dimensional Fact Model expresses facts, dimensions, measures and grouping paths before table implementation. Hierarchies assert functional dependencies from detailed members to broader levels, so a valid grouping path must reflect a real business relationship with unambiguous member identities. Dimensional Fact Model and Hierarchy Dependencies
A conceptual model also records when relationships may be absent, which attributes describe rather than group members, and when distinct paths must agree. These annotations keep missing relationships and inconsistent hierarchy assumptions from silently changing the meaning of analysis. DFM Optional Relationships Descriptive Attributes and Convergence
Grouping records does not by itself justify adding their measurements. Stream measures describe activity during periods, level measures describe snapshots, and unit measures are relative values. Whether SUM is meaningful depends on the dimension, compatible units and definitions, and non-overlapping contributions. Measure Additivity and Snapshot Semantics
Once an aggregation is meaningful, ask whether partial summaries retain enough information for a broader result. SUM, MIN and MAX combine directly; averages need supporting counts or sums; exact medians generally require richer information than partial medians and group sizes. Distributive Algebraic and Holistic Aggregates
A dimension may participate in distinct roles or admit simultaneous memberships. Shared hierarchies reuse one structure with role labels, while multiple edges represent several related members. A small stable set of categorical possibilities can instead be expressed as configuration flags. Shared Hierarchies Multiple Edges and Configuration Attributes
Some useful events have no stored numerical measurement. Factless schemas record occurrences that can be counted. To identify events that did not occur, additionally retain the expected or eligible combinations and compare them with actual occurrences at a matching grain and scope. Factless Facts and Coverage Sets
Facts preserve event dates, but changing descriptions also affect historical interpretation. Overwriting gives a current view; versioning connects facts to historical states. A stable direct fact reference, such as residence city at purchase, can sometimes preserve the specific context without versioning the entire customer. Historical Dimensions and Fact-Time Context
Storage and access choices depend on the expected queries, retained history and populated groups. Estimate fact counts, distinct dimension members and attribute sizes, including indexes and summaries. Aggregation changes occupancy, so detailed-level sparsity cannot simply be reused for every summary table. Warehouse Workload Volume and Aggregate Sparsity
Logical design translates the conceptual model into tables. A star keeps descriptive hierarchy attributes together; a snowflake separates selected dependencies into linked tables. Generated dimension keys can distinguish historical versions from source identity, while the fact key must respect the chosen grain. Star Snowflake Schemas and Surrogate Keys
A bridge keeps many-to-many membership separate from original facts, with optional allocation weights. Weighted queries distribute credit; impact queries report full activity associated with overlapping members. The query must preserve the distinction between allocated shares and distinct physical activity. Bridge Tables Allocation and Impact Queries
Some descriptive fields have no useful surrounding hierarchy. The lecture allows small values directly in the fact or combines several low-cardinality fields in a junk dimension. Each row describes a reusable combination of characteristics, not an individual event, and the combination domain must remain manageable. Degenerate Attributes and Junk Dimensions
Prerequisites remain in Lecture 02 - Introduction to Data Warehousing. The following map preserves source order; detailed concept notes explain the reusable mechanisms.
Source map
| PDF pages | Material |
|---|---|
| 2-5 | Risks, top-down/bottom-up, lifecycle and design stages |
| 7-9 | Business and structural requirements, glossary and source constraints |
| 11-15 | DFM, hierarchies, ER comparison and advanced annotations |
| 16-21 | Aggregation, measure classes and operator classes |
| 22-25 | Roles, multiple edges, configuration and factless schemas |
| 26-30 | Historical dimensions and the source’s time-model labels |
| 31-33 | Workload, volume and sparsity under aggregation |
| 35-40 | Relational logical design, stars and snowflakes |
| 41-44 | Bridge/push-down and weighted/impact queries |
| 45-47 | Degenerate attributes and junk dimensions |
Pages 1, 6, 10 and 34 are title/section dividers. This records major-topic coverage, not independent completion of every source table or diagram.
Worked connections from the lesson
Evidence before columns (PDF pages 7-9)
A complaint report needs resolution evidence and an agreed definition of resolution. The example makes the distinction between conceptual requirements, logical columns and the feeding design that supplies their values. Creating a column does not make missing information available.
Average support measures (PDF pages 19-21)
Added example: shop A has 100 complaints averaging 2 days; B has 10 averaging 10. The overall mean is (100*2 + 10*10)/110 = 2.727... days, not 6. Equal group counts justify a simple average of means; otherwise retain matching sums/counts or means/counts. Rounded means can lose precision. The slide’s price table on page 20 demonstrates the same unequal-group problem.
Two separate checks apply: the operation must make sense for the measure and dimension, and stored summaries must retain enough information for it. Mergeability does not make summed inventory snapshots meaningful.
Coverage versus occurrences (PDF page 25)
The promotion no-sales question needs eligible product-promotion-shop-period combinations, not the whole catalogue and not just products that sold. Compare with sales in the same scope. Missing occurrences require collection completeness before being treated as confirmed non-events.
Order city as an alternative (PDF pages 26-30; added design example)
Instead of always versioning an entire customer, an order can directly reference residence city at purchase. Preserve the reference after the customer’s current address changes. Name residence, billing and shipping city separately. This supports a specific historical question; several historical traits or changes independent of purchases can still justify customer versions.
The slides’ Type I/II/III labels must be read with their actual behavior. In particular, their Type III includes validity intervals and a master/root link and is not interchangeable with every other reference’s Type III definition.
Physical sales versus allocated credit (PDF pages 41-44)
Added example: a co-authored book sells 10 copies for EUR 100. A bridge has A=0.6 and B=0.4. Allocated revenue is EUR 60/EUR 40 and copy-equivalents are 6/4. Impact counts associate 10 actual copies with each author. A’s six is not the physical sales count. Keep original facts intact, apply weights only for allocation and label results clearly. Overall sales must not sum duplicated author-join rows.
Optional promotion and report scope (PDF page 15)
Dropping unmatched promotion rows computes promotion-associated revenue. It cannot be labeled total sales revenue unless that scope is intended. Keep unpromoted facts through suitable joins or no-promotion dimension members for an overall report; distinguish no promotion from unknown promotion when necessary.
Source qualifications and implementation limits
- DFM/ER and star/snowflake preferences are lecture framing, not current universal adoption or performance claims.
- Ordinary weeks can cross months; the Week -> Month example requires an explicit calendar-assignment rule.
- The slides’ dimension-key fact primary key is valid only when it uniquely identifies the chosen grain. Repeated transaction lines require additional identity.
- Holistic does not mean impossible from detailed data; it concerns limits of fixed-size partial summaries for exact results.
- The <=10 configuration-domain value is guidance, not a mathematical bound.
- The source uses degenerate dimensions broadly for single-attribute dimensions; other references can use the term more narrowly.
- Page 33 illustrates denser aggregate cubes. Detailed sparsity is not generally preserved when estimating summary sizes.
Questions for conceptual revision
- Why can the same schema contain data with incompatible business meanings?
- Which stock aggregations are meaningful, and why does the dimension matter?
- What supporting information does an average need for later aggregation?
- How do role labels differ from simultaneous membership?
- What extra evidence identifies promotion opportunities with no sale?
- When can a fact-time city reference replace full customer versioning?
- Why does a bridge still require deliberate aggregation and labels?
- When do snowflake joins or junk-dimension combinations justify their cost?
These prompts and worked teaching examples are added revision material, not an official assessment. Guided conceptual coverage does not establish independent mastery of all source examples.
Source and scope
Elena Baralis, Data warehouse design, Politecnico di Torino, DBMG, local DSTBD_3-DWprogConcLog-EN.pdf, 47 PDF pages. References use PDF page order. The source credits modeling material to Golfarelli and Rizzi, Data warehouse, teoria e pratica della progettazione, McGraw Hill, 2006. Original PDF and figures remain local under the copyright notice. Examples and qualifications marked as added are study explanations.
The major topics across all 47 pages and the important discussion examples are documented. Original PDF and figures are not copied into the published library. No lecture date, assessment requirement or full physical-design procedure is inferred.