Unit 2: Building a data warehouse
Data Warehousing and Data Mining notes · PTU syllabus (PGCA1941)
On this page
- Unit summary
- Building a data warehouse: considerations
- Data preprocessing: summarisation, cleaning and transformation
- The ETL process
- The multidimensional data model
- Star, snowflake and fact-constellation schemas
- Data warehouse architecture and design
- OLAP three-tier architecture
- Cube computation
- Data marts
- Key terms
- Quick revision
- Important questions
Unit summary
Building a warehouse involves design choices, clean data and a suitable schema. This unit covers design, technical and implementation considerations, data preprocessing, ETL, the multidimensional model, star, snowflake and fact-constellation schemas, OLAP three-tier architecture, cube computation and data marts.
After this unit you can
- State design, technical and implementation considerations
- Explain preprocessing and the ETL process
- Design star, snowflake and fact-constellation schemas
- Explain three-tier OLAP architecture, cube computation and data marts
PTU syllabus topics
- Design
- technical and implementation considerations
- data preprocessing (summarization, cleaning, transformation)
- ETL process
- multidimensional data model
- star/snowflake/fact-constellation schemas
- data warehouse architecture and design
- OLAP three-tier architecture
- cube computation
- data marts
- 1Extract
From source systems
- 2Clean
Fix errors, remove duplicates
- 3Transform
Standardise, aggregate
- 4Load
Into the data warehouse
- 5Refresh
On a schedule
Topic 1
Building a data warehouse: considerations
Design considerations
What subjects, sources, granularity, history and metadata?
Daily sales at item level for five years
Technical considerations
Hardware, DBMS, storage, network capacity, parallelism, tools
Cloud warehouse, columnar storage
Implementation considerations
Access tools, data extraction and loading, cleaning, security, user training, phased rollout
Start with a sales data mart, then expand
- Approaches: top-down (Inmon — enterprise warehouse first, then marts) and bottom-up (Kimball — marts first using conformed dimensions).
Topic 2
Data preprocessing: summarisation, cleaning and transformation
Data mining (knowledge discovery in databases, KDD) finds hidden, useful patterns in large data. Types: association, classification, clustering, prediction, outlier detection. Preprocessing prepares data: cleaning (missing values, noise), integration (combining sources), transformation (normalisation, aggregation) and reduction (fewer attributes or records). Attribute-oriented induction summarises data by generalising attribute values up a concept hierarchy (city → state → country) to produce concise descriptions.
- Summarisation
- Aggregate detailed data — daily to monthly totals
- Cleaning: missing values
- Ignore record, fill with mean or most probable value
- Cleaning: noisy data
- Binning, regression, clustering to smooth outliers
- Transformation: normalisation
- Min-max (scale to 0–1), z-score
- Transformation: generalisation
- Replace low-level values by higher concepts
Example
Min-max normalisation of income ₹73,600 when the range is ₹12,000–₹98,000: (73,600 − 12,000) ÷ (98,000 − 12,000) = 0.716.
Topic 3
The ETL process
- 1Extract
Pull data from source systems — full or incremental (change data capture)
- 2Transform
Clean, de-duplicate, standardise codes, convert units, derive and aggregate, apply surrogate keys
- 3Load
Initial load, then periodic incremental loads; refresh indexes and aggregates
- ELT variant loads raw data first and transforms inside a cloud warehouse.
- Tools: Informatica, SSIS, Talend, Pentaho, Apache NiFi, Azure Data Factory.
Topic 4
The multidimensional data model
- Data is viewed as a data cube of dimensions (time, product, location — the perspectives of analysis) and facts or measures (sales amount, units sold — the numbers analysed).
- An n-dimensional cube is a lattice of cuboids: the base cuboid holds the lowest level; the apex cuboid holds the grand total. With n dimensions and no hierarchies there are 2ⁿ cuboids.
Topic 5
Star, snowflake and fact-constellation schemas
Star schema
One central fact table linked to denormalised dimension tables
Simple, fast joins; some redundancy
Snowflake schema
Dimension tables normalised into sub-tables (city → state)
Less redundancy, easier maintenance; more joins, slower
Fact constellation (galaxy)
Several fact tables sharing dimension tables
Models several business processes (sales and shipping); complex
Example
Star schema for sales: fact table SALES(time_key, item_key, branch_key, location_key, units_sold, rupees_sold) with dimension tables TIME, ITEM, BRANCH and LOCATION.
Topic 6
Data warehouse architecture and design
- 1Data sources
Operational databases, files, external data
- 2Staging area and ETL
Extract, clean, transform
- 3Warehouse storage
Enterprise warehouse, data marts, metadata repository
- 4OLAP servers
MOLAP, ROLAP or HOLAP
- 5Front-end tools
Reports, dashboards, mining
- 1Choose a business process to model
- 2Choose the grain — atomic level of the fact table
- 3Choose the dimensions
- 4Choose the measures
Topic 7
OLAP three-tier architecture
- Top tier: front-end clients
Query, reporting, analysis and data mining tools — Power BI, Tableau, Excel
- Middle tier: OLAP server
ROLAP or MOLAP engine presenting multidimensional views
- Bottom tier: warehouse database server
Relational DBMS fed by ETL tools, with metadata repository
Topic 8
Cube computation
- Cube computation precomputes aggregates (cuboids) so OLAP queries answer instantly.
No materialisation
Nothing — compute on demand
Slow queries, no extra storage
Full materialisation
Every cuboid
Fastest queries, huge storage
Partial materialisation
Selected cuboids, iceberg cubes (only cells above a threshold)
Balance of speed and space
- Techniques: sorting, hashing and grouping to aggregate; computing higher cuboids from smaller computed ones; multiway array aggregation for MOLAP; the SQL CUBE operator (GROUP BY CUBE) computes all group-by combinations.
Topic 9
Data marts
Source
Fed from the enterprise warehouse
Fed directly from operational sources
Consistency
Consistent with the enterprise view
Risk of conflicting numbers ("data silos")
Speed to build
Needs the warehouse first
Quick, cheap start
- Top-down (Inmon): build the enterprise warehouse, then dependent marts. Bottom-up (Kimball): build conformed-dimension marts that together form the warehouse.
Key terms
- ETL
- Extract, transform and load
- Fact table
- Table of numeric measures with foreign keys to dimensions
- Snowflake schema
- Star schema with normalised dimensions
- Data cube
- Multidimensional view of measures
- Dependent data mart
- Mart fed from the enterprise warehouse
Quick revision
- Design, technical and implementation considerations.
- Cleaning, integration, transformation, reduction; ETL and ELT.
- Multidimensional model; star, snowflake, fact constellation.
- Three-tier OLAP; cube computation; dependent and independent marts; Inmon vs Kimball.
Important exam questions
Practice questions written to the PTU exam pattern for this unit's syllabus: short answers (Section A style) and long answers (Sections B and C style).
Short-answer questions
- Q1.What is ETL?
- Q2.What is data cleaning?
- Q3.Distinguish star and snowflake schemas.
- Q4.What is a fact constellation?
- Q5.How many cuboids does a 3-D cube have?
- Q6.Distinguish dependent and independent data marts.
Long-answer questions
- Q1.Explain the considerations in building a data warehouse.
- Q2.Explain data preprocessing and the ETL process.
- Q3.Explain star, snowflake and fact-constellation schemas with examples.
- Q4.Explain the OLAP three-tier architecture and cube computation.
Stuck on this unit?
Message SBS on WhatsApp for help with Data Warehousing and Data Mining, or to ask about studying M.Sc IT at Synetic.
