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.
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!
| Design Style | How Tables Connect | Query Complexity | Best 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 Schema | Dimensions 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 Schema | Fact 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! |
Whenever you model a new dataset, walk through these exact 4 steps in order:
dim_date, dim_customer, dim_product, dim_store).quantity, gross_amount, discount_amount, net_amount).Not every business question measures a single checkout! Kimball defines 3 distinct Fact archetypes:
| Fact Type | One Row Represents... | Example Use Case | Additivity Warning |
|---|---|---|---|
| 1. Transaction Fact | A single point-in-time event. | Every coffee sold, every ATM withdrawal. | Fully additive across time, stores, products. |
| 2. Periodic Snapshot Fact | Status 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 Snapshot | Complete 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! |
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).
-- 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;daily_ending_balance across 30 days reports 30x your bank's deposits! Filter to is_month_end = true or average across time (AVG).shipping_fee and line item_price naively on line-item rows without careful allocation — otherwise SUM(shipping_fee) fan-outs!WHO/WHAT/WHERE/WHEN).Test your understanding of the concepts covered in this lesson.
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.