Lecture: Lecture 02 - Introduction to Data Warehousing

Core idea

An analytical value needs context: revenue is a measure, while product, shop and time are dimensions. The grain defines exactly what one stored fact row represents. This choice determines both the detail available for analysis and what information is lost by summarizing.

Dimensions and measures (pages 9-10)

A measure is a quantity being analyzed, such as sold quantity or sales amount. Dimensions describe its context: which product, which shop and which date. A cube cell corresponds to a combination of dimension members; a cube is a conceptual representation and does not require physical array storage.

Added explanation: grain

Suppose one fact row means one product, in one shop, on one day. It summarizes all matching sales, rather than identifying an individual purchase. State this grain before interpreting or counting records. A product-day total is different from a transaction line, even when both contain quantity and revenue.

ProductShopDayQuantityRevenue
MilkBerlin1 September100EUR 150
MilkBerlin2 September80EUR 120

Revenue across these two days is EUR 270. Product and shop remain fixed while the time selection changes.

Information that totals cannot recover

Daily product totals do not say which items occurred in the same basket. Basket analysis needs transaction membership, for example a transaction identifier on individual purchase lines. The identifier must distinguish transactions across the relevant stores and period. Detailed records can produce daily totals; totals alone cannot reconstruct the original baskets.

The term grain and the basket examples are added teaching explanations of the source’s multidimensional and daily-sales examples.

Related: Star Schemas and Fact Tables, Association Rules - Support and Confidence.

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: 9-10, 13.

Exam practice and transfer

Worked scenario

A university warehouse is being designed around dimensions measures and fact grain. 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 product-shop-day fact row can total 100 milk units, but it cannot reconstruct which products shared a basket. Choose transaction-line grain when basket analysis is required.

Retrieval questions

  • Explain Dimensions Measures and Fact Grain 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.