Dimensional modeling (Kimball)

Facts vs dimensions, star vs snowflake, grain declaration first, conformed dimensions, degenerate dimensions. "Design the schema for orders analytics" is a guaranteed question.

About 25 min read3-question knowledge check

The mental model

A star schema is a cash register receipt surrounded by reference cards. The receipt line — the fact — records that something *happened*: this product, this store, this customer, this moment, this amount. It is long, thin, and append-mostly: billions of rows, few columns, almost all of them numbers and foreign keys. The reference cards — the dimensions — describe the nouns involved: everything you'd ever want to filter, group, or label by. They are short and wide: thousands to millions of rows, dozens of descriptive columns.

Every analytics question has the same grammar: *aggregate a measure, BY some attributes, WHERE some filters.* "Revenue by region by month for the premium tier." The star schema is that grammar frozen into tables: measures live in facts, every "by" and "for" lives in a dimension, and the join paths are one hop each.

Why this exists — what breaks without it: model everything as One Big Table and every new attribute is a full-table rewrite, every correction to a customer name touches a billion rows, and two teams computing "revenue by region" from slightly different denormalized snapshots get different numbers in the same board meeting. Model it fully normalized (3NF) and analysts face 14-way joins and nobody agrees which path through the schema is correct. Kimball's design is the deliberate middle: denormalize the descriptive stuff into flat dimensions, keep the events narrow and additive, and make every join a single obvious hop. The payoff is as much organizational as technical — conformed dimensions are how "region" means the same thing in finance's dashboard and marketing's.

The full lesson continues with 15 more sections
  • Deep dive
  • Internal architecture
  • Real-world use cases
  • Best practices
  • Common mistakes
  • Performance
  • Security
  • Production troubleshooting
  • Advantages & disadvantages
  • Alternatives
  • Interview expectations
  • Interview questions
  • Facts to remember
  • Cheat sheet
  • Quick revision