Unit 2: Building a data warehouse
Data Warehousing & Mining notes · PTU syllabus (BSIT504/BSBC501)
On this page
- Unit summary
- Building a data warehouse: considerations
- Data preprocessing
- Preprocessing: cleaning, integration, transformation and reduction
- Concept hierarchy
- The multidimensional data model
- Star, snowflake and fact-constellation schemas
- Data warehouse architecture and design
- OLAP three-tier architecture
- Cube computation
- Attribute-oriented induction
- Key terms
- Quick revision
- Important questions
Unit summary
Building a warehouse means designing schemas, preparing data and choosing an architecture. This unit covers design, technical and implementation considerations, data preprocessing — summarisation, cleaning and transformation — concept hierarchies, the multidimensional data model, star, snowflake and fact-constellation schemas, warehouse architecture and design, OLAP three-tier architecture, cube computation and attribute-oriented induction.
After this unit you can
- Explain considerations in building a data warehouse
- Preprocess data and use concept hierarchies
- Design star, snowflake and fact-constellation schemas
- Explain the three-tier architecture, cube computation and attribute-oriented induction
PTU syllabus topics
- Design/technical/implementation considerations
- data preprocessing (summarization, cleaning, transformation)
- concept hierarchy
- multidimensional data model
- star/snowflake/fact-constellation schemas
- data warehouse architecture and design
- OLAP three-tier architecture
- cube computation
- attribute-oriented induction
Time dimension
Day, month, year
Product dimension
Name, category, brand
Store dimension
City, region
Customer dimension
Age, segment
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
- 1Extract
Pull data from ERP, CRM, spreadsheets, logs
- 2Clean
Fix missing, noisy and inconsistent data
- 3Transform
Standardise codes, convert units, aggregate, derive fields
- 4Load
Initial full load, then periodic incremental refresh
Topic 3
Preprocessing: cleaning, integration, transformation and reduction
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 4
Concept hierarchy
- A concept hierarchy maps low-level values to higher-level concepts and drives roll-up and drill-down.
Location
Street → city → state → country
Time
Day → month → quarter → year (or day → week)
Product
Item → brand → category
Numeric (set-grouping)
Age 0–17 young, 18–59 adult, 60+ senior
Topic 5
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 6
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 7
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 8
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 9
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 10
Attribute-oriented induction
- 1Collect task-relevant data with a query
- 2Remove attributes with too many distinct values and no hierarchy
- 3Generalise remaining attributes up their concept hierarchies
- 4Merge identical generalised tuples and accumulate counts
- 5Present as a generalised relation, crosstab, chart or rules
Example
Graduate students' data generalised: birth place → country, GPA → "excellent" or "very good", age → "21–25"; result: 16 students "India, 21–25, excellent" — a concise description of the class.
Key terms
- ETL
- Extract, transform and load process
- Concept hierarchy
- Mapping of low-level values to higher concepts
- Fact table
- Table of measures with keys to dimensions
- Star schema
- Fact table surrounded by dimension tables
- Iceberg cube
- Cube storing only cells above a threshold
Quick revision
- Design, technical and implementation considerations; top-down vs bottom-up.
- ETL; cleaning, summarisation, normalisation; concept hierarchies.
- Dimensions and measures; cuboids; 2ⁿ.
- Star, snowflake, fact constellation; architecture and design steps.
- Three-tier architecture; full, partial and no materialisation; attribute-oriented induction.
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 a concept hierarchy?
- Q3.Distinguish a fact and a dimension.
- Q4.Distinguish star and snowflake schemas.
- Q5.Name the three tiers of OLAP architecture.
- Q6.What is an iceberg cube?
Long-answer questions
- Q1.Explain the considerations in building a data warehouse.
- Q2.Explain data preprocessing techniques.
- Q3.Explain star, snowflake and fact-constellation schemas with diagrams.
- Q4.Explain the three-tier data warehouse architecture and cube computation.
Stuck on this unit?
Message SBS on WhatsApp for help with Data Warehousing & Mining, or to ask about studying B.Sc IT at Synetic.
