Contents

Data Engineering › Data Modeling for Analytics

Star vs Snowflake Schema

Simpler queries vs less duplication.

Also known as: star schema vs snowflake schema, snowflake vs star, star or snowflake, normalized dimensions vs denormalized dimensions

Both are dimensional models: a central fact table with dimension tables around it. The difference is whether the dimensions are denormalized (star) or normalized into sub-tables (snowflake).

STAR: each dimension is one flat table
 fact_sales ─► dim_product (product_id, name, subcategory, category, department)

SNOWFLAKE: the dimension is split into related tables
 fact_sales ─► dim_product ─► dim_subcategory ─► dim_category ─► dim_department
StarSnowflake
Dimension tablesFlat, denormalizedNormalized into hierarchy tables
Joins per queryFewer (fact to each dimension)More (chains of joins)
Query simplicitySimple, easy for analysts and BI toolsMore complex
RedundancyRepeats values (the category name appears on every product)Minimal duplication
Updating a shared valueUpdate many rowsUpdate one row
StorageSlightly moreSlightly less
Query speedUsually fasterUsually slower (more joins)

Which to choose

Star is the usual default. Today’s analytical engines are columnar and compress repeated values very well, so the storage saved by snowflaking is small, while the extra joins cost query time and make the model harder to use. Simplicity matters because many people write queries against it.

Snowflaking can make sense when:

  • A sub-dimension is shared by several dimensions, or is big and changes often, so maintaining it separately has real value.
  • You have a very large dimension with a very low-cardinality hierarchy and strict storage or update constraints.
  • You need to enforce consistency of a reference hierarchy from one source of truth.

Often, you can keep the physical design normalized in an earlier layer, and present a star to users in the final layer (staging, intermediate and marts).

Don’t agonize over it. Pick the simplest model that answers your questions clearly, and keep it consistent.