The two layouts
- Star schema. Each dimension is a single denormalized table.
dim_customerscontainsname, country, region, segmentall in one row. The shape on a diagram is a fact table in the middle with dimensions radiating outward — hence "star." - Snowflake schema. Dimensions are normalized further.
dim_customershas aregion_key;dim_regionshas acountry_key;dim_countriessits beyond that. The shape is a fact table with dimensions branching into sub-dimensions — hence "snowflake."
The unsexy truth
For analytics work, star wins almost every time. The reasons:
- Fewer joins per query → faster execution and clearer SQL.
- BI tools generate cleaner queries against star schemas.
- Denormalized dimensions are easier to mentally model.
- Storage is cheap; the extra space the denormalization costs is negligible compared to the readability win.
Snowflake schemas have a place — when a sub-dimension is huge and changes independently, breaking it out can be the right call. But the default for a new analytics warehouse is a star schema, and you should snowflake only when the specific cost-of-keeping-it-flat justifies it.