Course: Data Science and Database Technologies
Professor: Elena Baralis, Politecnico di Torino, DBMG.
Source: Data warehouse - Introduction, local DSTBD_2-DWintro-EN.pdf, 27 PDF pages.
Lecture date: not supplied. Documentation date: 20 October 2026. 02 follows the source filename identifier, not a confirmed lecture date.

Lecture summary

The previous lecture asked how data becomes useful knowledge. This lecture supplies a database foundation for that work: preserve consistent business history, organize it around analytical questions, and prepare it without disrupting daily transactions.

Operational systems record everyday business activity. Decision support asks broader questions across that activity, such as how demand changes over time. Business Intelligence (BI) turns business data into information for decisions; a separate warehouse supplies integrated historical data for that analysis. Decision Support BI and Data Warehouses

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 Measures and Fact Grain

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. Star Schemas and Fact Tables

Once the grain is fixed, warehouse size depends on how many dimension combinations receive records. Many possible combinations may be empty, making the dataset sparse. Precomputed summaries can accelerate repeated analysis, but they require storage and maintenance and cannot replace detail needed for other questions. Warehouse Size Sparsity and Aggregation

With dimensions and measures in place, an analyst can calculate summaries and explore finer detail. OLAP supports this structured exploration, while data mining uses algorithms to discover patterns or build models. Locating a sales decline through drill-down helps focus investigation but does not establish its cause. OLAP Drill Down and Data Mining

Reliable comparisons require more than identical column layouts. ETL extracts source records, cleans and transforms them into agreed meanings and formats, then loads them into the warehouse. A common structure cannot fix incompatible revenue definitions or product identifiers without explicit reconciliation. ETL and Semantic Integration

An enterprise warehouse integrates information across the business, while a data mart focuses on a department or subject. A dependent mart draws from the warehouse; an independent mart draws directly from sources. Narrower scope can speed implementation, but separately chosen definitions make later integration harder. Data Warehouses and Data Marts

The analytical cube is a logical view rather than a requirement to store a literal array. ROLAP uses relational database structures, MOLAP uses specialized multidimensional storage, and HOLAP combines approaches. Data sparsity and access patterns help explain the implementation tradeoffs. ROLAP MOLAP and HOLAP

Stored values need definitions that explain their origin, transformations and intended use. Metadata describes this context as well as warehouse structures and query execution. It lets users and maintainers trace how a result was produced instead of assuming that a tidy number is trustworthy. Warehouse Metadata and Lineage

Separating analysis from transaction processing creates the source and warehouse levels. A three-level design adds a staging area that separates extraction and transformation from final loading. This intermediate workspace eases complex preparation but adds stored copies and management work. Two and Three Level Warehouse Architectures

The numerical examples and architecture details below develop that sequence. Broader mining methods remain in Lecture 01 - The Big Data Challenge.

Why analytical data is separate (PDF pages 2-7)

Decision support uses company records for demand analysis, forecasting, identifying business problems, reporting and strategy. BI provides the broader infrastructure and tools for turning records into actionable information. The source’s application areas include manufacturing, distribution, finance, insurance, telecommunications, public services and healthcare.

Operational transactions need prompt access and updates. Historical analysis may scan and aggregate large volumes, competing for those resources. Separation also allows different access methods, integrated representations and retention of history that sources may not maintain.

A warehouse is subject-oriented, integrated, time-dependent and non-volatile. Non-volatile should be understood alongside the later refresh discussion: warehouse history is maintained for analysis, not frozen against every load or correction.

From a question to a dimensional model (PDF pages 9-12)

The source uses supermarket sales. Product, shop and time provide dimensions; sold quantity and sales amount provide measures. Their intersection identifies an analytical cell. The cube is conceptual; relational tables can implement it.

Added teaching example: one daily fact row might describe milk sold in Berlin on 1 September, with quantity 100 and revenue EUR 150. A second day with revenue EUR 120 makes the two-day total EUR 270. A brand belongs in the product description, while revenue is a sales measure.

The relational star diagram places Sale at the center with Product, Shop and Date around it. The central table holds numerical measures and references to context; descriptive dimension attributes let queries group or filter facts.

Added grain clarification: define exactly what one row represents. Product-shop-day records preserve daily totals but not which items appeared together in an individual basket. Purchase-line records with transaction membership can produce daily totals; daily totals cannot reconstruct basket membership.

How large can the fact table become? (PDF page 13)

AssumptionValue
History2 x 365 = 730 days
Shops300
Product catalogue30,000 products
Products sold daily per shop3,000

730 x 300 x 3,000 = 657,000,000 fact rows.

The slide estimates about 21 GB. This is an illustrative source estimate, not a universal storage requirement. Using the whole catalogue would yield 6.57 billion possible combinations; the daily sold-product assumption gives the smaller row estimate. Missing combinations make the representation sparse, but absence must not automatically be equated with a confirmed zero.

Analysis, exploration and presentation (PDF pages 14-15)

OLAP supports complex aggregation, including the slide’s moving-average and top-ten examples. Mining supplies algorithmic pattern discovery. Presentation is separate: different interfaces can render the same query result.

Added exploration example: annual revenue falls; examine months, identify September, then compare September by shop. Drill-down locates a pattern at finer detail. It does not establish whether a shortage, pricing change or another factor caused it. Required detail must have been retained.

Enterprise scope and analytical servers (PDF pages 17-20)

The architecture separates transactional computing and analysis, with sources, ETL, warehouse management, metadata, marts, OLAP servers and analysis tools cooperating.

A company warehouse requires broad business modeling and longer implementation. A data mart focuses on a department or subject. Dependent marts draw from the warehouse; independent marts draw from sources and need careful design to avoid later integration problems.

Added definition conflict: sales may count revenue at order time while finance counts it at payment time. Identical table layouts do not reconcile those meanings.

Server typeRepresentation and source emphasis
ROLAPRelational DBMS, aggregate SQL and specialized access methods
MOLAPMultidimensional matrix format, compression for sparsity and specialized primitives
HOLAPHybrid of relational and multidimensional approaches

The logical cube and physical storage are different choices; the source does not establish a universal speed ranking.

Preparing data and documenting meaning (PDF pages 21-23)

ETL extracts source records, cleans for correctness and consistency, transforms to warehouse format, and loads prepared results. The process runs for initial population and refreshes.

Added semantic-integration example: Berlin’s M01 may refer to the same product as Munich’s MILK7, while their revenue figures use different tax bases. Establish product identity and a common amount definition before adding values. Matching names and column types alone does not establish comparability.

Metadata describes source mappings and transformations, warehouse structures and materialized views, and query execution such as SQL, plans and resource usage. Tracing origins and transformations is an added explanation of lineage. Metadata documents intended meaning; it does not prove every value is correct.

Architecture levels (PDF pages 24-27)

Two levels separate sources from the warehouse environment, with ETL between them. This decouples workloads, modeling, physical design and temporal granularity. Three levels add an intermediate staging area so extraction/transformation and final loading can be managed separately. The extra layer helps complex preparation but adds redundant storage.

Logical levels are not a count of servers. ETL exists in both architectures. The source sometimes labels the intermediate store ODS; this is source terminology rather than a universal equivalence between every ODS and every staging area.

Conceptual revision

  • What information is lost if transaction lines become daily product totals, and which analyses then become impossible?
  • Two marts report different revenue despite identical schemas. Which definitions and transformations would you inspect?
  • Why can drill-down locate a decline without establishing its cause?
  • When would a separate staging area justify its storage and management cost?
  • Why does drawing a cube not require using MOLAP storage?
  • How can a warehouse be non-volatile while still being refreshed?

These are added practice prompts, not an official assessment. Guided discussion does not establish independent mastery of every topic.

Source and scope

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.

All major topics in the supplied introduction are documented. Grain, basket reconstruction, example tables, historical-category questions and operational qualifications are added teaching material. No source diagrams are reproduced. No new lecture date, exam requirements or implementation standard is inferred.