8 min read

    🧱 The 7 Core Components of a Data Warehouse

    datawarehousecomponentsarchitecture

    🧱 Data Warehouse Components

    Analogy

    Think of a Data Warehouse like a modern airport.

    • Planes bring passengers from different cities (Data Sources)
    • Arrivals hall processes and checks them (Staging + ETL)
    • The terminal is the central hub (Data Warehouse)
    • Different gates serve different destinations (Data Marts)
    • Flight information screens show real-time info (Reporting Layer)
    • The airport manual guides operations (Metadata Layer)

    1️⃣ Data Sources

    The starting point β€” where all raw data comes from before entering the warehouse.

    Source TypeExamples
    Relational databasesMySQL, Oracle, SQL Server (OLTP systems)
    Flat filesCSV, Excel, JSON, XML
    APIsREST APIs from third-party services
    Streaming dataKafka, IoT sensors, clickstream
    Legacy systemsMainframes, old ERP systems
    SaaS applicationsSalesforce, SAP, HubSpot
    Tip

    Data sources are not cleaned or structured β€” they're raw. That's what the next layers handle.


    2️⃣ Staging Area

    Analogy

    Like the arrivals lounge in an airport β€” passengers land here first before being processed. No one goes directly to the city.

    The Staging Area is a temporary storage zone where raw data from sources is dumped before transformation. It acts as a buffer between sources and the warehouse.

    What happens here:

    • Raw data is extracted and stored as-is
    • Basic validation checks run (file format, row counts)
    • Data is held temporarily β€” cleared after ETL completes
    • No transformation yet β€” just a landing pad
    Source DB β†’ [Extract] β†’ Staging Area (raw tables) β†’ [Transform] β†’ DW
    
    Warning

    Staging area data is not used for reporting. It's intermediate. Never expose it to business users.


    3️⃣ ETL Process

    Extract β†’ Transform β†’ Load β€” the engine that moves data from staging into the warehouse.

    StepWhat Happens
    ExtractPull data from source systems into staging
    TransformClean, standardize, deduplicate, apply business rules
    LoadPush the transformed data into the DW
    Example:
    Extract  β†’ Pull sales records from 5 regional databases
    Transform β†’ Standardize currency to INR, remove duplicates, fill nulls
    Load     β†’ Insert into the central Sales fact table in DW
    
    Tip

    ETL is covered in depth in upcoming topic. Think of it here as the pipeline that feeds the warehouse.


    4️⃣ Data Warehouse (Core)

    The central repository β€” the heart of the system. This is where clean, integrated, historical data lives.

    Characteristics (recap):

    • Subject-oriented, Integrated, Time-variant, Non-volatile
    • Optimized for read-heavy analytical queries
    • Uses Star or Snowflake schema (covered in Schemas & Relationships)
    • Contains Fact tables (measures) and Dimension tables (context)
    DW Structure:
    β”œβ”€β”€ Sales Fact Table         (revenue, quantity, discount)
    β”œβ”€β”€ Customer Dimension       (name, city, segment)
    β”œβ”€β”€ Product Dimension        (name, category, price)
    └── Date Dimension           (day, month, quarter, year)
    
    Info

    This is what analysts actually query β€” everything upstream exists to feed this layer.


    5️⃣ Data Marts

    Analogy

    If the DW is a supermarket, a Data Mart is a specialty store β€” only Electronics, or only Groceries. Smaller, faster, department-specific.

    A Data Mart is a subset of the Data Warehouse scoped to a specific business department or function.

    Data MartWho Uses ItWhat It Contains
    Sales MartSales teamRevenue, deals, targets
    Finance MartFinance teamP&L, budgets, costs
    HR MartHR teamHeadcount, attrition, payroll
    Marketing MartMarketing teamCampaigns, leads, conversions

    Types:

    • Dependent β€” built from the central DW (recommended)
    • Independent β€” built directly from source systems (creates silos β€” avoid)
    Warning

    Independent data marts recreate the same problem DW was built to solve β€” inconsistent data per department.


    6️⃣ OLAP / Reporting Layer

    The presentation layer β€” where business users interact with the data.

    What lives here:

    • OLAP cubes β€” pre-aggregated, multi-dimensional data structures for fast slicing and dicing
    • BI Tools β€” Power BI, Tableau, Qlik, Looker
    • Reports & Dashboards β€” scheduled reports, self-service analytics
    Analyst query flow:
    BI Tool β†’ OLAP Layer β†’ DW / Data Mart β†’ Result in seconds
    
    Tip

    OLAP cubes pre-compute aggregations (SUM, AVG, COUNT) so dashboards load instantly instead of recalculating each time.


    7️⃣ Metadata Layer

    Analogy

    Like the airport operations manual β€” the actual passengers don't read it, but it governs how everything runs. Without it, nothing works correctly.

    Metadata is data about data. The metadata layer describes everything inside the warehouse β€” structure, lineage, definitions, and rules.

    Types of Metadata:

    TypeDescriptionExample
    TechnicalSchema, data types, table structuressales_fact has columns amount DECIMAL(10,2)
    BusinessDefinitions business users understand"revenue" = net sales after discounts
    OperationalETL logs, load timestamps, job statusLast loaded: 2024-06-20 02:00 AM
    Tip

    Metadata answers: "Where did this data come from? What does it mean? When was it last updated?" β€” critical for trust and governance.


    πŸ—ΊοΈ Full Architecture Flow

    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚                   DATA SOURCES                      β”‚
    β”‚  (OLTP DBs, Files, APIs, SaaS, Streaming)           β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚ Extract
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚                 STAGING AREA                        β”‚
    β”‚         (Temporary raw data landing zone)           β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚ Transform + Load (ETL)
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚               DATA WAREHOUSE (Core)                 β”‚
    β”‚      (Fact tables + Dimension tables, historical)   β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚ Subset                   β”‚ Metadata
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚     DATA MARTS      β”‚  β”‚      METADATA LAYER        β”‚
    β”‚ (Dept-specific DW)  β”‚  β”‚  (Definitions, Lineage)    β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚ Query
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚          OLAP / REPORTING LAYER                     β”‚
    β”‚      (Power BI, Tableau, OLAP Cubes, Reports)       β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    

    πŸ§ͺ Practice Drill

    text
    // Try answering these:
    // Q1. Name all 7 components of a Data Warehouse architecture in order from source to reporting.
    // Q2. What is the purpose of the Staging Area? Why is it separate from the DW?
    // Q3. A company has a DW. The Sales team wants a faster, smaller database with only sales data. What should they use and what type should it be?
    // Q4. What's the difference between a Dependent and an Independent Data Mart? Which is preferred and why?
    // Q5. Match each metadata type to its example:
    // | Example | Metadata Type |
    // |---|---|
    // | `employee_id` is an `INT NOT NULL` column | ? |
    // | ETL job ran at 3:00 AM and loaded 50,000 rows | ? |
    // | "Revenue" means total sales minus returns | ? |
    
    πŸ’‘ Click for Solutions

    A1. Data Sources β†’ Staging Area β†’ ETL Process β†’ Data Warehouse β†’ Data Marts β†’ OLAP/Reporting Layer β†’ Metadata Layer

    A2.

    • Staging is a temporary buffer where raw data lands before being transformed
    • It's separate from the DW to isolate dirty/raw data from clean analytical data
    • It also protects source systems β€” data is extracted once into staging, not queried repeatedly

    A3.

    • Use a Data Mart (Sales Mart)
    • It should be Dependent β€” sourced from the central DW to ensure consistent, trusted data

    A4.

    • Dependent β€” built from the central DW; inherits cleaned, standardized data βœ…
    • Independent β€” built directly from source systems; creates data silos and inconsistency ❌
    • Dependent is preferred β€” it maintains a single source of truth

    A5.

    ExampleMetadata Type
    employee_id is an INT NOT NULL columnTechnical
    ETL job ran at 3:00 AM and loaded 50,000 rowsOperational
    "Revenue" means total sales minus returnsBusiness

    ← Previous Topic | Next Topic β†’ Next Topic