π¦ Data Warehousing Basics & Characteristics
π¦ What is a Data Warehouse?
Imagine a company has 10 departments β Sales, HR, Finance, Logistics, etc. Each has its own spreadsheet or database. When the CEO asks "How did we perform last year?", nobody can answer clearly β data is scattered everywhere.
A Data Warehouse is the single place where all that data is brought together, cleaned, and stored β so anyone can query it and get one consistent answer.
A Data Warehouse (DW) is a centralized repository that stores large volumes of structured, historical data collected from multiple sources β designed specifically for analysis and reporting, not day-to-day operations.
Data Warehouse = Store everything β Clean it β Make it queryable β Analyse it
π 4 Characteristics of a Data Warehouse
These 4 characteristics were defined by Bill Inmon (father of Data Warehousing).
1οΈβ£ Subject-Oriented
A DW is organized around key business subjects β not around applications or processes.
| OLTP (Application-oriented) | DW (Subject-oriented) |
|---|---|
| Order management system | Sales subject area |
| HR payroll system | Employee subject area |
| Hospital billing app | Patient subject area |
Instead of storing "what the app does", the DW stores "what the business cares about" β Sales, Customers, Products, Finance.
2οΈβ£ Integrated
Data comes from many different sources β and they often use different formats, naming conventions, and units. The DW integrates all of it into a single consistent format.
Source A (CRM): gender = "M" / "F"
Source B (HR): gender = "Male" / "Female"
Source C (Legacy): gender = 1 / 0
After Integration in DW β gender = "Male" / "Female" (one standard)
Integration happens during ETL & ELT|ETL β this is where conflicts are resolved and data is standardized.
3οΈβ£ Time-Variant
Data in a DW is stamped with time and kept historically. Unlike OLTP (which only shows current state), DW shows how data changed over time.
OLTP β Employee salary = βΉ80,000 (current value only)
DW β Jan 2022: βΉ60,000
Jan 2023: βΉ70,000
Jan 2024: βΉ80,000 (full history preserved)
DW data typically spans 5β10 years of history. This is what enables trend analysis.
4οΈβ£ Non-Volatile
Once data is loaded into the DW, it is not updated or deleted β it's read-only.
OLTP β UPDATE Employees SET salary = 80000 WHERE id = 101; β
Happens constantly
DW β No updates. New records are added. Old records stay as-is. β
DW does NOT support real-time edits. Data is loaded in batches (daily, weekly) via ETL. The purpose is analysis β not transaction management.
β Why is a Data Warehouse Needed?
1. Centralization
Without a DW, data lives in silos β CRM, ERP, spreadsheets, legacy systems. A DW pulls everything into one place.
Before DW: Finance queries their DB. Sales queries theirs. Different answers. Confusion.
After DW: Everyone queries the same DW. One answer. One truth.
2. Analytics Optimization
OLTP databases are optimized for transactions β running analytics on them is slow and risky. A DW is purpose-built for complex, heavy queries.
SELECT region, SUM(revenue)
FROM Sales
WHERE year BETWEEN 2020 AND 2024
GROUP BY region
ORDER BY SUM(revenue) DESC;
-- This query on OLTP: slow, affects live users
-- Same query on DW: fast, isolated from operations
3. Data Consistency
Different departments often have conflicting numbers. DW enforces one version of the truth β same definitions, same calculations, same data.
4. Scalability
DW systems (like Data Architectures|Snowflake, Redshift, BigQuery) are built to scale to terabytes and petabytes of data without performance degradation.
πΊοΈ Full Picture
Multiple Sources (OLTP, Files, APIs, Logs)
β
ETL Process
β
Data Warehouse
(Subject-oriented, Integrated, Time-variant, Non-volatile)
β
BI Tools / Reports / Dashboards
β
Decision Making
π§ͺ Practice Drill
// Try answering these:
// Q1. What are the 4 characteristics of a Data Warehouse? Give a one-line definition for each.
// Q2. Your company's CRM stores `country = "IN"` but the ERP stores `country = "India"`. Which DW characteristic handles this problem? How?
// Q3. Why is data in a DW non-volatile? What would go wrong if updates were allowed?
// Q4. An analyst wants to compare monthly revenue for the past 5 years. Why is a Data Warehouse better suited for this than an OLTP system?
// Q5. Match the characteristic to the scenario:
// | Scenario | Characteristic |
// |---|---|
// | All sales data from 2019β2024 is stored | ? |
// | HR and Finance data use the same employee ID format | ? |
// | The DW is organized around Customers, Products, Sales | ? |
// | Once loaded, last year's data cannot be changed | ? |
π‘ Click for Solutions
A1.
- Subject-oriented β organized around business subjects (Sales, HR, Finance), not applications
- Integrated β data from all sources is standardized into one consistent format
- Time-variant β historical data is preserved with timestamps to enable trend analysis
- Non-volatile β once loaded, data is not updated or deleted; it's read-only
A2. Integrated β during ETL, a transformation rule standardizes both to one format (e.g., "India")
A3. Non-volatile ensures historical accuracy. If past data could be updated, trend analysis would be corrupted β you'd lose the ability to see what happened at any point in time.
A4.
- OLTP is optimized for writes and current data only; heavy reads slow it down and impact live users
- DW is read-optimized, holds historical data spanning years, and is isolated from operations
A5.
| Scenario | Characteristic |
|---|---|
| All sales data from 2019β2024 is stored | Time-variant |
| HR and Finance data use the same employee ID format | Integrated |
| The DW is organized around Customers, Products, Sales | Subject-oriented |
| Once loaded, last year's data cannot be changed | Non-volatile |
β Previous Topic | Next Topic β Next Topic