BI and data warehouse architectures
Overview of Business Intelligence (BI) and data-warehouse architectures: definitions, components, common architectures (Kimball/Inmon), schemas, ETL, and practical sizing + exam tips.
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Business Intelligence (BI) systems give companies answers from data. An engineer builds or maintains the data platform (data warehouse, ETL, data marts, OLAP) so that analysts and managers get fast, correct reports and dashboards. Good architecture controls data quality, query performance, cost and scalability.
Key ideas
Start from first principles and build definitions.
- Data source — any system that produces operational data (examples: OLTP databases, CSV files, logs, APIs). Define before using.
- Operational system (OLTP) — a system optimised for many small transactions with strict ACID (Atomicity, Consistency, Isolation, Durability) properties. It is not suitable for large analytical queries.
- Data warehouse — a central repository of integrated, historical, subject-oriented data, designed for analysis and reporting. University-style definition: "A data warehouse is a subject-oriented, integrated, time-variant and non-volatile collection of data in support of management's decision-making process." Assumptions: data is cleaned and transformed; users run analytical queries, not transactional updates.
- Subject-oriented — organised around key business subjects (sales, customers), not application functions.
- Integrated — data reconciled to a common format (units, codes, naming) across sources.
- Time-variant — stores historical snapshots (dates/time dimensions) to support trends.
- Non-volatile — data is rarely deleted/updated; mainly read-only for analysis.
- ETL (Extract, Transform, Load) — the process that moves data from sources into the warehouse: Extract (read from sources), Transform (clean, join, derive, conform), Load (write into warehouse). Alternatives: ELT (Extract, Load, Transform) where transformations run inside the warehouse. Include Change Data Capture (CDC) for incremental loads and distinguish batch ETL from streaming ingestion for real-time BI.
- Staging area — temporary storage for raw extracted data before transformation. Helpful for replay and debugging.
- Metadata — "data about data" (schema, data lineage, data quality metrics). Essential for governance and for BI tools to understand data semantics.
- Data mart — a subset of the warehouse designed for a specific business area or team. Can be dependent (sourced from enterprise warehouse) or independent.
- OLAP (Online Analytical Processing) — systems and operations optimised for aggregated queries on multidimensional data (fast reads, complex aggregations). OLAP commonly uses pre-aggregated data or specialized storage. Know the variants: MOLAP (multidimensional cubes), ROLAP (relational star/snowflake on SQL engines), and HOLAP (hybrid).
- Schemas used in warehouses: define them and their assumptions. Also know fact table types (transactional, periodic snapshot, accumulating snapshot), measure additivity (additive, semi-additive, non-additive), the use of surrogate keys for dimensions, degenerate dimensions (e.g., order_id stored in the fact), and the importance of declaring the fact table grain.
- Star schema — one central fact table (measures) connected to several denormalized dimension tables. Draw: one large box (fact) in center connected by lines to smaller boxes (dimensions). Label PK/FK. Assumption: faster joins, simpler queries, some redundancy in dimensions.
- Snowflake schema — normalized dimensions (dimensions split into multiple related tables). Draw: fact in center, dimensions branching into sub-dimension tables (possibly multiple levels). Assumption: reduced redundancy, more joins -> possibly slower queries.
- Fact constellation (galaxy) — multiple fact tables sharing dimension tables (used when several processes share dimensions). Draw: two or more fact boxes connected to common dimension boxes.
- Warehouse architectures (explain main styles and where to draw them):
- Inmon (top-down approach) — build an Enterprise Data Warehouse (EDW) first (3NF normalized), then create data marts for specific needs. Draw: multiple sources -> staging -> EDW (3NF) -> data marts -> BI tools. Assumption: central control, stronger integration, longer initial time-to-value. Note: Data Vault modeling (hubs, links, satellites) is often used inside the EDW to support agility and historization.
- Kimball (bottom-up approach) — build conformed data marts using dimensional models (star schema) and integrate them into a data warehouse bus. Draw: sources -> staging -> many dimensional data marts (star schemas) sharing conformed dimensions -> BI tools. Assumption: faster delivery per mart, practical for departmental needs; requires careful conformed-dimension design.
- Data Lake and Lakehouse — store raw and semi-structured data in object storage (data lake); a Lakehouse adds transactional features and schema enforcement. Draw: sources -> raw lake (object store) -> processing -> curated zones -> query engines/warehouse. Use when you need flexible storage of large semi-structured data.
- Hub-and-spoke — EDW as the central hub with dependent departmental data marts as spokes; useful in large organisations.
- Federated/virtualized — no single centralized EDW; a semantic layer or data virtualization queries and integrates multiple source systems or marts.
- Architectural concerns / non-functional requirements (state them clearly): scalability, availability, performance (query latency, ETL window), data quality, security & governance, cost.
- Common optimisation techniques: indexing, partitioning (by date), materialized views / aggregate tables, columnar storage, compression, data clustering/sorting, pre-aggregation, MPP (massively parallel processing) architectures.
Diagrams to draw in answers: draw boxes labeled "Source systems" -> arrows to "Staging area" -> arrow to "ETL" -> arrow to central box "Data Warehouse (star or 3NF)" -> arrows to "Data marts/OLAP cubes" -> arrows to "BI tools / dashboards". For Kimball show multiple star schemas with a shared "Date" and "Customer" dimension (label as conformed).
Formulas
ETL throughput = Data volume / ETL time — where Data volume is in bytes (B) and ETL time in seconds (s). Throughput unit: B/s. Use to estimate bandwidth needed.
Storage = N_rows × Avg_row_size — N_rows in rows, Avg_row_size in bytes (B), Storage in bytes (B). Use when estimating table storage.
Query latency ≈ Base_latency + (Rows_scanned / Scan_rate) — Rows_scanned in rows, Scan_rate in rows/s, latency in seconds. This is an approximate model for full-scan queries.
Number of partitions = Ceiling(Table_size / Desired_partition_size) — Table_size in bytes, Desired_partition_size in bytes.
Notes: these formulas are simple engineering approximations for capacity planning. Verify scan rates and sizes experimentally on your target system.
Worked examples
- Storage estimation for a fact table (numerical, step-by-step)
Problem: A sales fact has 50 million rows per year. Each fact row stores: sale_id (8 B), date_key (4 B), customer_key (8 B), product_key (8 B), quantity (4 B), amount (8 B), and overhead (padding, indexes) 20 B per row. Estimate storage for 3 years.
Steps:
- Average row size = 8 + 4 + 8 + 8 + 4 + 8 + 20 = 60 B per row.
- Rows total for 3 years = 50,000,000 × 3 = 150,000,000 rows.
- Storage = 150,000,000 × 60 B = 9,000,000,000 B.
- Convert to GB: 1 GB = 10^9 B (for rough estimate), Storage ≈ 9.0 GB.
Answer: 9.0 GB (approx). Note: if using GiB (2^30) then divide by 1,073,741,824 -> ≈ 8.38 GiB.
- ETL duration and throughput (numerical)
Problem: You must load 500 GB of raw logs nightly in a 4-hour ETL window. What throughput is required? If a single worker can process 50 MB/s, how many parallel workers are needed?
Steps:
- ETL time = 4 h = 14,400 s.
- Required throughput = 500 GB / 14,400 s = 500 × 10^9 B / 14,400 s ≈ 34,722,222 B/s ≈ 34.72 MB/s. (Since 1 MB = 10^6 B here for bandwidth.)
- Worker capacity = 50 MB/s each; workers needed = Ceiling(34.72 / 50) = 1 worker (practically use at least 2 for redundancy and overhead).
Answer: ~34.7 MB/s required; 1 worker by capacity, but use 2 for safety.
- Schema design trace (algorithmic)
Problem: You have an orders table (order_id, created_ts, customer_name, customer_addr, product_code, quantity, price). Design a star schema: identify fact and dimensions and list dimension attributes.
Steps:
- Fact table: FactSales with measures: quantity, price, extended_amount = quantity × price; foreign keys: date_key, customer_key, product_key; include order_id as a degenerate dimension attribute (no separate dimension table).
- Dimension DimDate attributes: date_key (PK), date, month, quarter, year.
- Dimension DimCustomer attributes: customer_key (PK), name, address, city, state, country.
- Dimension DimProduct attributes: product_key (PK), product_code, product_name, category.
- Draw star: FactSales center connected to DimDate, DimCustomer, DimProduct.
Answer: The star schema with FactSales and three dimensions; include derived measure extended_amount in the fact.
Common mistakes
- Ignoring conformed dimensions (in Kimball) — inconsistent dimension keys across marts causes integration problems.
- Overusing normalization in dimensions (snowflake) when star would be faster for queries.
- Skipping a staging area — makes debugging and reloading difficult.
- Not collecting metadata and lineage — causes trust issues.
- Using wrong units when estimating storage (mixing GB with GiB without noting conversion).
For your exam
Question types you will see: short definitions (define data warehouse, ETL, star schema), compare/contrast (Kimball vs Inmon), draw-and-explain architecture diagrams, schema design (convert a set of operational tables to star schema), capacity planning numericals (storage, ETL throughput), and long questions on pros/cons and optimisation.
What full-mark answers include:
- For definitions: the formal definition plus the four properties (subject-oriented, integrated, time-variant, non-volatile).
- For diagrams: a clear box-and-arrow diagram: label sources, staging, ETL, warehouse, data marts, BI tools; indicate flow direction; label star vs 3NF where relevant.
- For schema design: state fact vs dimensions, list keys and attributes, show joins and explain grain (lowest level of fact). Mention SCD handling for dimensions (Type 1 vs Type 2) where relevant.
- For numericals: show each step, units, formula used, and final answer with units.
- For architecture essays: explain trade-offs (time-to-value, governance, performance), give recommended techniques (partitioning, column-store, aggregates). Mention metadata and data quality.
Quick check
- What are the four defining properties of a data warehouse?
- In a star schema, should dimensions be normalized? Give the usual reason.
- If you must load 1 TB in 2 hours, what throughput in MB/s is required? (1 TB = 10^12 B, 1 MB = 10^6 B)
Answers: 1) Subject-oriented, integrated, time-variant, non-volatile. 2) Usually not fully normalized—dimensions are denormalized for simpler, faster queries and fewer joins. 3) Throughput = (10^12 B) / (7200 s) ≈ 138,888,889 B/s ≈ 138.9 MB/s.
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?