Sources: 3_Data_Warehouse.pdf; past questions: QP_DM_SEM_25.pdf and pqy26.pdf. Slide numbers refer to PDF pages.
Follow the lecture: warehouse characteristics and OLTP → architecture and ETL → cubes, schemas, measures and OLAP. For exam answers draw a labelled diagram and explain it with a sales example.
Important: Prepare the theory in the lecture slides throughout this note. Expect descriptive answers; practise drawing and explaining architecture, schemas and OLAP operations.
Not explicitly mentioned: Individual omissions cannot be inferred from the guidance: it says the slide theory is broadly covered. No warehouse topic is marked excluded.
PYQ caution: Some complete past questions also contain data mining, machine learning or preprocessing parts. Those extra parts are retained for context but are not separately identified as warehouse topics by this guidance.
1. Meaning and characteristics — ⭐ IMPORTANT THEORY
A data warehouse is a subject-oriented, integrated, time-variant and nonvolatile collection of data that supports management decision-making. Data from heterogeneous operational sources is cleaned, integrated and stored for historical analysis. Data warehousing is the process of building, maintaining and using this repository.
| Characteristic | Meaning | Example |
|---|---|---|
| Subject-oriented | Organized around business subjects rather than individual applications. | Analyse customers, sales or products across departments. |
| Integrated | Source naming, units and codes are made consistent. | Convert INR/USD and M/F versus male/female into common conventions. |
| Time-variant | Retains a historical time horizon; facts are associated with time. | Compare monthly sales over five years. |
| Nonvolatile | Data is primarily loaded/refreshed and queried, not repeatedly changed by ordinary operational transactions. | Historical sales are loaded periodically for reporting. |
A shop’s billing system records today’s purchase; the warehouse combines years of store and online sales so a manager can compare trends by product and region.
Nonvolatile does not mean that warehouse data can never be corrected, refreshed or deleted. Modern warehouses also use transaction and recovery mechanisms; the lecture’s point is that operational row-by-row transaction workloads are not their primary purpose.
2. Why separate the warehouse? OLTP versus OLAP — ⭐ IMPORTANT THEORY
Complex analytical queries can compete with operational transactions for resources. A separate warehouse supports historical data, consistent integration and query structures tuned for analysis, while the operational database handles current transactions.
| Aspect | OLTP: operational DBMS | OLAP: warehouse analysis |
|---|---|---|
| Purpose | Run day-to-day business | Analyse performance and support decisions |
| Data | Current, detailed, application-oriented | Historical, integrated, subject-oriented; detailed and/or summarized |
| Queries | Many short, predictable reads/writes | Complex, often ad-hoc scans and aggregations |
| Design | Often normalized, entity-relationship based | Often dimensional star/snowflake schemas |
| Users | Clerks, applications, customers | Analysts, managers, decision makers |
| Updates | Frequent small inserts/updates | Periodic/batch or streaming loads; analysis mainly reads |
A federated/query-driven approach integrates sources when a query is issued, so source availability and query latency matter. A warehouse is traditionally update-driven: integrate and load data in advance, then query the stored result.
2025 CO1(a) (5 marks): What is a data warehouse? How is it differ from DBMS? Compare the similarities of Data Mining with Machine Learning.
2026 CO1(c) (1+4 marks): Why do we need a separate Data Warehouse? Describe the multi-tier architecture of Data Warehouse with proper schematic diagram.
A data warehouse is a subject-oriented, integrated, time-variant and nonvolatile collection of data used to support management decisions. Its four characteristics are:
- Subject-oriented: It organizes data around subjects such as customers, products and sales, rather than individual business applications.
- Integrated: It combines heterogeneous sources and makes their names, codes, formats and units consistent.
- Time-variant: It stores data across a long time horizon so trends and changes can be examined.
- Nonvolatile: Data is primarily loaded, refreshed and queried rather than continually changed by operational transactions.
An operational DBMS supports OLTP: frequent short transactions such as recording purchases and updating stock. It usually contains current, detailed data and is designed for concurrent inserts and updates. A warehouse supports OLAP: complex queries, comparisons and summaries over integrated historical data. It is often organized using dimensional schemas.
Data mining and machine learning: Both analyse data to discover patterns and build models; both can use classification, clustering and predictive methods. Machine learning emphasizes algorithms that learn and generalize, while data mining also emphasizes discovering useful knowledge from large data collections and presenting it to users.
A separate warehouse prevents heavy analytical queries from slowing down daily operations. It also supplies cleaned and consolidated historical information that may not exist in any single operational database. For example, a retailer can compare five years of sales across stores without querying each store’s billing system separately.
Compare OLTP and OLAP in database design, priority, metric, unit of work, orientation, users, function and view. Why are conventional transaction mechanisms less central to OLAP?
| Aspect | OLTP | OLAP |
|---|---|---|
| Design | Usually normalized operational tables | Often dimensional schemas and aggregates |
| Priority | Fast, correct transaction processing | Flexible analysis and query performance |
| Metric | Transactions per second and response time | Query response time and analytical throughput |
| Unit of work | Short insert, update or lookup | Complex read, aggregation or multidimensional query |
| Orientation | Application/process-oriented | Subject-oriented and historical |
| Typical users | Clerks, customers and operational applications | Analysts, managers and decision-makers |
| Function | Run day-to-day operations | Explore, compare and support decisions |
| View | Current, detailed records | Integrated, historical and summarized data |
Read-heavy OLAP queries generally need less transaction control than concurrent operational updates. However, warehouse loads and refreshes still require suitable consistency, concurrency management and recovery.
3. Three-tier architecture — ⭐ IMPORTANT THEORY + DIAGRAM
- Bottom: sources, ETL/staging, warehouse database, metadata and potentially data marts. A gateway or extraction interface reads source data.
- Middle: OLAP server represents multidimensional data and computes aggregates; ROLAP uses relational tables, MOLAP uses multidimensional storage, and HOLAP combines both.
- Top: front-end tools for queries, reporting, visualization, analysis and mining.
Metadata is data about warehouse data: source and target definitions, schemas, mappings, transformation rules, refresh schedules, and measure meanings. It helps users interpret data and administrators operate the warehouse.
2025 CO1(c) (5 marks): Describe 3-tier Architecture of Data Warehouse with a neat sketch.
2026 CO1(c) (1+4 marks): Why do we need a separate Data Warehouse? Describe the multi-tier architecture of Data Warehouse with proper schematic diagram.
A data warehouse commonly uses a three-tier architecture. Data moves from operational sources through integration and storage to an OLAP server, and finally to analysis tools used by decision makers.
TOP TIER: FRONT-END TOOLS
Reporting | Queries | Dashboards | Data mining
↑
MIDDLE TIER: OLAP SERVER
ROLAP / MOLAP / HOLAP and cube operations
↑
BOTTOM TIER: WAREHOUSE SERVER
Integrated warehouse database and data marts
↔ Metadata repository
↑
ETL: extract, clean, transform and load
↑
Operational databases | Files | External sources- Bottom tier: Data is extracted from operational databases, files and external sources. ETL processes clean, transform and integrate it before loading it into the warehouse database. Data marts may provide department-specific subsets. The metadata repository records schema definitions, source mappings, transformations and refresh information.
- Middle tier: An OLAP server presents stored data as multidimensional information. A ROLAP server works over relational tables; MOLAP uses multidimensional storage; HOLAP combines the two. It supports operations such as roll-up, drill-down, slice and dice.
- Top tier: Users access the warehouse through reporting, query, visualization and data-mining tools. Managers can, for example, compare annual sales by product and region.
A separate warehouse prevents complex analytical queries from slowing operational transactions, and it retains integrated historical data for decision support. The separation lets source data be integrated once and then analysed interactively at different levels of detail.
4. Enterprise warehouse, data mart and ETL — ⭐ IMPORTANT THEORY
An enterprise warehouse integrates enterprise-wide subjects. A data mart is a smaller subject- or department-focused analytical store, such as a sales mart; it may be dependent on an enterprise warehouse or populated independently. An incremental approach can deliver usable subject areas in stages, with consistent dimensions for integration.
ETL means extract, transform, load:
- Extract: obtain data from databases, transaction logs, files, APIs and other source systems.
- Transform: clean missing/duplicate or inconsistent records; standardize codes, units and dates; integrate, validate, derive and aggregate attributes.
- Load: insert the prepared data into the target warehouse; subsequently refresh it as sources change.
Extraction strategies include full extraction (copy the whole source; simple but expensive), and incremental extraction (capture changes since the last load, e.g. timestamps, change flags, database logs or change data capture). Extraction may occur online against the source or from an offline snapshot/export. Incremental extraction must also handle deletions and missed or late changes.
2026 CO1(b) (1+4 marks): What is ETL? Explain different data extraction strategies of ETL.
ETL stands for Extract, Transform and Load. It moves data from source systems into a data warehouse in a consistent form.
- Extract: Read data from sources such as operational databases, files and external systems.
- Transform: Clean errors and duplicates, resolve missing or inconsistent values, standardize units and codes, integrate sources, and derive or aggregate values when required.
- Load: Store the transformed data in the warehouse, initially and during later refreshes.
The principal extraction strategies are:
- Full extraction: Copy the entire source dataset on each extraction. It is straightforward and useful for an initial load or a small source, but repeated full copies can consume considerable time and resources.
- Incremental extraction: Extract only records inserted, updated or deleted since the previous successful extraction. Timestamps, change flags or database-log-based change data capture can identify changes. This reduces routine processing, but reliable change tracking and deletion handling are necessary.
Extraction can be performed online from a running source, or offline from an export, backup or snapshot. For example, a store may initially load all sales records, then extract only each day’s changes.
Describe the multi-tier warehouse architecture with a diagram; define a data mart and metadata repository.
A common warehouse architecture has three tiers:
Operational databases / external sources
↓ extract, clean, transform, load
Bottom tier: warehouse database, metadata and data marts
↓
Middle tier: OLAP server (ROLAP, MOLAP or HOLAP)
↓
Top tier: reporting, visualization, analysis and mining toolsThe bottom tier stores integrated historical data; the middle tier supports multidimensional analytical queries; the top tier presents results to users. A data mart is a subject- or department-focused subset or store, such as a sales mart. The metadata repository stores definitions, schemas, mappings, transformations and lineage so the warehouse can be maintained and understood.
5. Multidimensional model and cubes — ⭐ IMPORTANT THEORY + DIAGRAM
A fact is a business event or measurement, e.g. a sale. A measure is its numeric value, e.g. units or sales amount. A dimension provides an analysis perspective, e.g. product, location and time. The grain states exactly what one fact row represents, such as one product on one invoice line.
Time
↑
| [sales amount]
| /
|/___\______→ Product
/
LocationA cube cell represents a combination such as (Laptop, Kolkata, Jan 2026) → ₹2,00,000. A cuboid is a particular grouping of dimensions. With three dimensions, the base cuboid is (product, location, time) and the apex is (ALL, ALL, ALL), the grand total. There are cuboids if each dimension is either retained or aggregated to ALL; additional hierarchy levels add more possible groupings.
Concept hierarchies — ⭐ IMPORTANT THEORY
A hierarchy orders detail levels: day → month → quarter → year → ALL or street → city → state → country → ALL. Rolling up follows it towards coarser summaries; drilling down reverses it.
Categories of measures — ⭐ IMPORTANT THEORY
| Category | Can we combine fixed-size partial summaries? | Examples |
|---|---|---|
| Distributive | Yes, using the same aggregate. | SUM, COUNT, MIN, MAX |
| Algebraic | Yes, using a fixed number of distributive results. | AVG = SUM/COUNT; variance from count, sum and sum of squares |
| Holistic | Not generally from a fixed-size exact summary. | Exact median, mode and rank |
For example, average of group averages is incorrect when group sizes differ; combine their sums and counts. Additive sales can be summed across dimensions, while inventory balance is typically semi-additive: summing across days generally has no useful meaning.
2025 CO2(a) (3+3+4 marks): Describe two methods for handling missing values for some attributes in real-world data. Discuss about the various types of patterns which can be mined for some business applications. Describe the measures of multidimensional data model.
Handling missing values: One method is to replace a missing numeric value with the attribute mean or median, calculated from an appropriate set of records. A second method predicts the missing value using related attributes, for example a decision tree or regression model. Mean imputation is simple but can reduce variation; prediction uses more information but depends on model quality.
Business patterns: Association rules identify products purchased together for cross-selling; classification predicts categories such as likely customer churn; clustering groups customers by similar behaviour for targeted marketing; regression predicts a numeric outcome such as future sales.
Measures: In a multidimensional model, a measure is a value that is analysed across dimensions. For example, sales amount can be analysed by product, location and month. Measures are classified according to how their aggregate values can be computed:
- Distributive measures: An aggregate over the whole dataset can be obtained by applying the same function to aggregates of its partitions. Examples are
SUM,COUNT,MINandMAX. If two stores sell ₹100 and ₹150, their combined sales are . - Algebraic measures: An aggregate can be calculated from a fixed number of distributive summaries. For example,
AVGis computed as totalSUM / COUNT. If one group has sum 100 and count 2, and another has sum 180 and count 3, the combined average is . Averaging the two group averages without their counts would be incorrect. - Holistic measures: In general, an exact answer cannot be computed from a fixed-size set of partial summaries. Examples include exact median and mode. To calculate a combined median, knowing only the median of each group is not generally enough.
Thus the category determines which partial aggregates can be stored and combined efficiently.
A warehouse has dimensions time, doctor and patient, and measures count and charge (the doctor’s fee per patient visit). Draw a 3-D cuboid.
Draw a cube with axes time, doctor and patient. Each cell corresponds to one combination of those dimension values, and stores the measures count and charge.
time
↑
| /────────/|
| / / |
| /────────/ |
| | cell: | | → doctor
| | count, | /
| | charge | /
| |────────|/
└──────────────→ patientFor example, the cell (Jan 2024, Dr Sen, patient P) might contain (count=2, charge=₹1,000), meaning two visits with total recorded charges of ₹1,000 at that grain. The cube can be aggregated by time or across patients to compare totals.
6. Dimensional schemas — ⭐ IMPORTANT THEORY + DIAGRAM
- Star: central fact table refers directly to denormalized dimension tables.
Sales(time_key, product_key, store_key, units, amount)connects toTime,Product,Store. - Snowflake: some dimensions are normalized into related hierarchy tables. For example
Store → City → State → Country. Reduces duplication but adds joins. - Fact constellation / galaxy: multiple fact tables share dimensions.
SalesandInventorymay shareProduct,StoreandTime.
2025 CO2(c) (6+4 marks): Give examples for defining star, snowflake and fact constellation schemas. With illustrative examples explain various OLAP operations.
A dimensional schema describes fact tables, their measures and the dimensions used to analyse them.
1. Star schema: A central fact table is connected directly to denormalized dimension tables. For example:
Time(time_key, month, year)
|
Product(product_key, name) — Sales — Store(store_key, city, state)
|
Customer(customer_key, name)
Sales(time_key, product_key, store_key, customer_key, units, amount)The fact table stores numeric measures such as units and amount, together with foreign keys to the dimensions. Dimensions contain descriptive attributes.
2. Snowflake schema: Dimension tables are normalized into related hierarchy tables. For example, Sales → Store(store_key, city_key) → City(city_key, state_key) → State(state_key, state_name). This reduces repeated dimension data but requires additional joins.
3. Fact constellation: Two or more fact tables share dimension tables. For example, Sales(time_key, product_key, store_key, amount) and Inventory(time_key, product_key, store_key, stock_quantity) share the Time, Product and Store dimensions. This supports analysis of related business processes in the same model.
OLAP operations: Roll-up summarizes city sales to state totals; drill-down reverses this from state to city. Slice fixes one dimension, for example sales in January, while dice selects a subcube such as laptops and phones in Kolkata and Delhi for January–March. Pivot rotates the display axes.
Compare star, snowflake and fact constellation schemas; define a metadata repository. For a warehouse with time, doctor, patient, count and charge, draw a fact constellation. The stated measures can be modeled in one visit fact; a constellation requires an additional meaningful fact table and shared dimensions, so state an assumption.
A star schema places a sales fact table with measures such as amount at the centre and links it directly to Time, Product and Store dimensions. It is simple and needs fewer joins.
A snowflake schema normalizes one or more dimensions: for example Store → City → State. This reduces repeated descriptive data but adds joins.
A fact constellation has multiple fact tables sharing dimensions: Sales and Inventory can both refer to Product, Store and Time. It supports multiple related business processes.
The metadata repository stores information about the warehouse, including schemas, definitions of measures, source-to-target mappings, transformation rules, refresh schedules and data lineage. For the doctor’s fees scenario, Visit can be one fact; a second fact must be explicitly assumed to draw a true constellation.
7. OLAP operations — ⭐ IMPORTANT THEORY + EXAMPLES
| Operation | Action | Sales example |
|---|---|---|
| Roll-up / drill-up | Summarize to a higher hierarchy level or remove a dimension. | City → state; month → year. |
| Drill-down / roll-down | Move from summary to finer detail. | Year → quarter → month; state → city. |
| Slice | Fix one dimension at one value. | All product and city sales for 2026. |
| Dice | Select a subcube by ranges or sets on multiple dimensions. | Products {phone,laptop}, cities {Kolkata,Delhi}, years 2025–2026. |
| Pivot / rotate | Reorient axes without changing underlying values. | Swap product rows with time columns. |
| Drill-through | Go from a cube summary to underlying detailed records. | Open invoice lines behind monthly sales. |
2026 CO1(d) (5 marks): Describe the working procedure(s) of the following OLAP operations with proper example: drill-up, roll-down, and slice-dice.
2025 CO2(c) (6+4 marks): Give examples for defining star, snowflake and fact constellation schemas. With illustrative examples explain various OLAP operations.
Consider a sales cube with dimensions Product, Location and Time, and sales amount as its measure.
- Roll-up (drill-up): Summarizes data at a higher level of a hierarchy. If Kolkata sales are ₹20,000 and Howrah sales are ₹10,000, rolling up from city to state combines them into West Bengal sales of ₹30,000. Similarly, monthly totals can be rolled up to quarterly totals.
- Drill-down (roll-down): Moves from a summary to finer detail. Starting with the West Bengal total of ₹30,000, drill down to display Kolkata ₹20,000 and Howrah ₹10,000. Drilling from year to quarter or month is another example.
- Slice: Fixes one dimension to one value, producing a lower-dimensional view. Selecting
Time = January 2026shows product-by-location sales for that month. - Dice: Selects a subcube using values or ranges on several dimensions. Selecting products
{phone, laptop}, locations{Kolkata, Delhi}and months{January, February}gives sales for those combinations only.
Roll-up and drill-down change the level of detail; slice and dice restrict the portion of the cube being examined.
Schemas for the 2025 question: A star connects a Sales fact table containing amount and keys directly to Product, Time and Store dimensions. In a snowflake, a dimension is normalized, for example Store → City → State. In a fact constellation, Sales and Inventory fact tables share dimensions such as Product, Time and Store.
Explain drill-up, drill-down, drill-across, pivot, slice, dice and drill-through with examples. From [day, doctor, patient], list each doctor’s total fees in 2012: roll time up to year, select 2012 and aggregate over patients and days. For fee(day, month, year, doctor, hospital, patient, count, charge): SELECT doctor, SUM(charge) FROM fee WHERE year = 2012 GROUP BY doctor; This assumes charge is additive per row.
With sales by time, product and location:
- Roll-up / drill-up: aggregate day to month, such as daily sales to monthly totals.
- Drill-down: reverse the level of detail, such as year to quarter to month.
- Slice: fix one dimension, e.g. sales in 2012.
- Dice: select ranges or sets on multiple dimensions, e.g. two products in two cities during 2012.
- Pivot: rotate the view, for example swap product rows and time columns.
- Drill-across: compare measures from related fact tables at a common dimensional level, e.g. sales and inventory by product and month.
- Drill-through: move from a summarized cube cell to its underlying detailed records.
For the doctor question, roll day up to year, slice year = 2012 and aggregate over patients, retaining doctor. Assuming charge is additive per stored row, the relational query is:
SELECT doctor, SUM(charge) AS total_fee
FROM fee
WHERE year = 2012
GROUP BY doctor;8. Uses, benefits and issues — ⭐ IMPORTANT THEORY
Warehouse applications include information processing (queries and reports), analytical processing (multidimensional trends and comparisons), and data mining (classification, clustering, associations and prediction). Benefits include a consistent historical view, improved analytical response and informed decisions. Challenges include heterogeneous integration, data quality, schema changes, large storage and refresh costs, and maintaining security and metadata. A warehouse does not guarantee business value without useful, trustworthy data and appropriate analysis.




















