Lecture: Lecture 03 - Data Warehouse Conceptual and Logical Design
Core idea
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.
Explanation and examples
| Class | Example | Aggregation meaning |
|---|---|---|
| Stream | Quantity sold, sales amount | Accumulate compatible activity over disjoint groups/periods |
| Level | Inventory, account balance | Generally not additive across time |
| Unit | Unit price | Not meaningfully summed across dimensions in the source model |
Added example: 10 cartons sold Monday plus 15 Tuesday means 25 sold. Stock of 100 Monday evening plus 90 Tuesday evening does not mean 190 available: some cartons occur in both snapshots. Stock across separate shops at the same moment may be summed with compatible units and scope.
One item at EUR 10 and nine at EUR 2 generate EUR 28. Average realized price per item is 28/10 = EUR 2.80; the unweighted mean of two price observations is EUR 6 and answers a different question.
Page 18 illustrates compatible SUM roll-ups over product/type/category and quarter/year. It does not authorize adding snapshots or duplicated many-to-many contributions. Not additive restricts SUM; it does not automatically make AVG appropriate. The source separately mentions non-aggregable measures.
Related: Distributive Algebraic and Holistic Aggregates, Bridge Tables Allocation and Impact Queries.
Source
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. Relevant PDF pages: 16-18.
Exam practice and transfer
Worked scenario
A warehouse designer is deciding how to represent measure additivity and snapshot semantics for a university reporting system. State the intended grain and business meaning first, then trace one example row or query and explain why the representation preserves the required analysis.
Concrete example
Daily sales can be summed across days. An end-of-day inventory snapshot should not be summed across days because it describes a level, not independent activity.
Retrieval questions
- Explain Measure Additivity and Snapshot Semantics 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.