Skip to catalogue

155

star schema

Facts in the middle, dimensions around them. The fact row is a measurement. The dimension is a noun you filter on.

What is star schema?

A star schema puts numeric events in a fact table and descriptive attributes in dimension tables. You do not join fact to fact casually. A snowflake normalizes dimensions further and is usually not worth it for analytics.

Why does star schema matter when vibe coding?

Models copy the OLTP schema into the warehouse and then every question is a twelve-join query. Name fact and dimension.

How do you do star schema?

One fact grain (one row means one order line, not sometimes an order). Dimensions are conformed. Facts are append-mostly. Do not store the user’s current address only on the fact if you need history.

How do you ask a model for star schema?

Model (question) as a star. Fact grain is one (event). Dimensions are (nouns). Do not join facts to facts. Do not copy the transactional schema in unchanged.

What goes wrong with star schema?

A fact table with no declared grain. Rows mean different things and sums double.

adjacent