Skip to main content
Back to Academy📐 2. Enterprise Dimensional Modeling
5 min read
Try Hands-on Lab
VISUAL LESSON2. Enterprise Dimensional Modeling

The Ralph Kimball Dimensional Architecture: Facts, Dimensions & Grain

Master Ralph Kimball's Star Schema methodology: choosing Fact grain, separating Facts (events/numbers) from Dimensions (who/what/where/when), Conformed Dimensions, and the 3 types of Fact tables.

Kimball Dimensional ModelingStar Schema vs Snowflake SchemaFact Table vs Dimension TableConformed DimensionsTransaction vs Snapshot Fact TableData Warehouse Schema Design

Explain Like I'm New: Verbs vs. Nouns in Business Storytelling

Every business question reads like a simple English sentence: > *"How many coffee mugs (WHAT) did VIP customers (WHO) buy at our Berlin store (WHERE) on Black Friday (WHEN) — and how much revenue did they generate (HOW MUCH)?"*

Ralph Kimball noticed you can organize every analytical warehouse cleanly into two table shapes: - Dimension Tables (`WHO, WHAT, WHERE, WHEN`): Descriptive nouns and context filters (dim_customer, dim_product, dim_store, dim_date). Usually smaller/wider with text labels. - Fact Tables (`HOW MUCH / VERBS`): Measurable business events and numeric numbers (fact_sales: quantity, unit_price, tax_amount, net_revenue). Usually huge/narrow, holding millions or billions of rows plus Foreign Keys pointing to the dimensions.

When you draw one Fact Table in the center surrounded by its Dimensions, it looks like a star — that's a Star Schema!

Key Beginner Takeaway: Put numbers you add (`SUM`/`COUNT`) inside Fact Tables, and put attributes you filter or group by (`WHERE country = 'DE'`, `GROUP BY category`) inside Dimension Tables.

Star Schema vs. Normalized (3NF) vs. Snowflake Schema

Design StyleHow Tables ConnectQuery ComplexityBest Used For
3NF (Normalized OLTP)Dozens of tiny broken-up tables (order -> item -> sku -> brand -> dept).Heavy 8–12 table joins, slow dashboards.Operational apps (INSERT/UPDATE), Bronze staging.
Snowflake SchemaDimensions split into sub-dimensions (fact -> product -> brand -> category).Medium-hard multi-hop joins for every BI filter.Only extreme legacy storage-constrained systems.
Kimball Star SchemaFact joins in 1 single hop directly to flat, rich Dimensions (dim_product contains brand & category).Simple 1-hop joins! Blazing fast for Power BI, Tableau & humans.Gold analytical data products!

The 4-Step Kimball Design Process (Works Every Time!)

Whenever you model a new dataset, walk through these exact 4 steps in order:

  1. Select the Business Process: Pick the real-world operational activity (e.g., *Retail Checkout Sales*, *Bank Transfers*, *Ticket Listings*).
  2. Declare the Grain (MOST IMPORTANT!): Define what 1 single row in the Fact table represents at its lowest atomic level (e.g., *"One row per line-item scanned on a customer receipt"* — NEVER jump straight to monthly averages!).
  3. Identify the Dimensions: Ask *"Who, What, Where, When, Why"* is known at that exact moment (dim_date, dim_customer, dim_product, dim_store).
  4. Identify the Facts (Additive Measures): List the numeric measurements recorded at that exact grain (quantity, gross_amount, discount_amount, net_amount).

Know the 3 Fact Table Patterns

Not every business question measures a single checkout! Kimball defines 3 distinct Fact archetypes:

Fact TypeOne Row Represents...Example Use CaseAdditivity Warning
1. Transaction FactA single point-in-time event.Every coffee sold, every ATM withdrawal.Fully additive across time, stores, products.
2. Periodic Snapshot FactStatus captured on a fixed rhythm (daily/monthly).End-of-day bank account balances or warehouse stock counts.Semi-additive! You can SUM across accounts today, but NEVER SUM Monday's balance + Tuesday's balance! Use AVG or last-day across time.
3. Accumulating SnapshotComplete lifecycle of an item with milestones.Order workflow: placed_date, paid_date, shipped_date, delivered_date.Updated (MERGE) as milestones finish (hours_to_ship). Multiple Role-Playing joins to dim_date!

Conformed Dimensions & Bus Matrix (Stopping Department Wars)

Have you ever seen Finance and Marketing argue because Finance reports $1.2M revenue while Marketing reports $1.4M? Usually they used different product categories or fiscal calendars!

A Conformed Dimension means dim_date, dim_customer, and dim_product are built once in Silver/Gold and shared identically across `fact_sales`, `fact_returns`, and `fact_inventory`. Everyone slices numbers using the exact same source of truth (Drill Across).


Example Star Schema SQL Check

-- Look how readable Gold Star Schema SQL is for analysts!
SELECT
  d.fiscal_quarter,
  p.category_name,
  COUNT(DISTINCT f.receipt_id) AS receipts,
  SUM(f.quantity)              AS units_sold,
  SUM(f.net_amount)            AS net_revenue_usd
FROM gold.fact_pos_line_items f
JOIN gold.dim_date    d ON f.date_key    = d.date_key
JOIN gold.dim_product p ON f.product_sk  = p.product_sk
JOIN gold.dim_store   s ON f.store_sk    = s.store_sk
WHERE d.fiscal_year = 2026
  AND s.region = 'EMEA'
GROUP BY d.fiscal_quarter, p.category_name
ORDER BY net_revenue_usd DESC;

Common Beginner Mistakes (And How to Fix Them)

  1. Summing Semi-Additive Balances: Summing daily_ending_balance across 30 days reports 30x your bank's deposits! Filter to is_month_end = true or average across time (AVG).
  2. Pre-aggregating facts too early: If you only store daily store totals instead of atomic receipt items, nobody can later analyze basket size or coupon adoption. Always build atomic Transaction Facts first!
  3. Mixing different grains in one Fact table: Never mix header shipping_fee and line item_price naively on line-item rows without careful allocation — otherwise SUM(shipping_fee) fan-outs!

Quick Cheat Sheet

  1. Fact = measurable event numbers + Foreign Keys; Dimension = rich text context (WHO/WHAT/WHERE/WHEN).
  2. Always declare the grain first ("1 row = ...").
  3. Star Schema > Snowflake for BI simplicity and fewer joins.
  4. Respect Periodic Snapshot semi-additivity (never sum balances across dates!).

Comprehension & Architecture Check (3 Questions)

Test your understanding of the concepts covered in this lesson.

1. Which fact table archetype is best suited for storing Global DynaDatum Bank's 240,000 month-end deposit records across 20,000 customer accounts?
2. Why should beginners check a table's grain before writing a JOIN?
3. Which Medallion layer is meant to store clean, deduplicated, standardized records?
Practice What You Learned

EX-2: SCD Type 2 Temporal Joins: Fix the £8M Cash ISA Discrepancy

The bank's monthly executive report was suddenly missing £8,000,000 in reported customer savings for May 31, 2026. The cause was traced to a join mistake: on July 1, the product team updated the product catalog with new category names (calling Cash ISAs "Investments" instead of "Savings"). Because the report joined balances to products using only the product code without checking dates, past May balances were matched to future July categories, duplicating rows and putting £8M into the wrong bucket.

Solve Challenge