Data & architecture

Star schema vs snowflake schema: choosing the right dimensional model

Picture an analyst building a quarterly sales dashboard. She joins the sales fact table to a customer dimension, a product dimension and a date dimension, and the report renders in under a second. Six months later, someone has "tidied up" the model by splitting product into separate product, category and supplier tables. The same dashboard now needs three extra joins and takes noticeably longer to load. That gap, one join hop against several, is the star schema versus snowflake schema question in miniature.

A star schema is a dimensional model built around one central fact table holding measurable events, such as sales or clicks, surrounded by denormalised dimension tables like customer, product and date. Every dimension joins directly to the fact table, so a query needs only a single hop per attribute, which is why star schemas dominate BI and reporting warehouses.

What a star schema actually is

A fact table stores the numbers a business cares about: order value, quantity sold, page views, whatever the grain of the model is. Each row carries foreign keys pointing out to a set of dimension tables, and those dimensions hold the descriptive attributes that give the numbers meaning: which customer, which product, which store, which day.

The defining feature is that dimension tables are denormalised. A product dimension does not just hold a category ID that points to a separate category table; it holds the category name, the subcategory name and the supplier name directly, repeated on every row where they apply. That repetition is the trade the star schema makes deliberately: a wider dimension table in exchange for a query that only ever has to join the fact table to one dimension table at a time, never through a chain of lookups.

Fact tables themselves usually take one of three shapes. A transaction fact table records one row per event as it happens, a periodic snapshot fact table records one row per period, such as month-end account balances, and an accumulating snapshot fact table updates a single row as a process moves through stages, such as an order moving from placed to shipped to delivered. The choice of fact table type does not change how dimensions attach to it, but it does change what the grain actually means for that table.

What a snowflake schema does differently

A snowflake schema starts from the same fact table but normalises the dimensions further. Instead of one flat product table, you get product, category and supplier as three separate tables, each linked by a foreign key. The name comes from the shape this produces on a diagram: a dimension that branches out into sub-dimensions looks like the arms of a snowflake rather than the single points of a star.

The upside is the classic normalisation argument: a category name is stored once, in the category table, rather than duplicated across every product row that belongs to it. Rename a category and you update one row, not thousands. The cost is that reaching the category name from the fact table now takes two joins instead of one, and every additional layer of normalisation adds another hop a query planner has to work through.

Star schema vs snowflake schema: the direct comparison

On query performance, the star schema usually wins in a reporting context. Fewer joins means less work for the query engine and a simpler execution plan, which matters most when dashboards are running dozens of similar queries against the same fact table throughout the day. The snowflake schema asks the engine to traverse more tables to answer the same question, and on very large dimensions that extra traversal is where the slowdown shows up.

On storage and integrity, the snowflake schema has the stronger argument. Normalised dimensions avoid repeating the same category or supplier details on every row, which matters when a dimension is large and its attributes change over time. A single update to a shared attribute is also less error-prone than hunting down every denormalised copy of it.

In practice, most analytics teams default to a star schema and only normalise a dimension when there is a specific reason to, such as a dimension so large that duplication becomes a real storage or consistency problem. A fully snowflaked model across every dimension is rare outside older, disk-constrained data warehouses, because modern platforms are built to make the star schema's trade-off pay off.

Why star schemas tend to win in analytics warehouses

Modern column-store warehouses are built around scanning wide tables efficiently and compressing repeated values well, which quietly removes much of the storage penalty that used to justify normalising dimensions. Storage is cheap and columnar compression handles repetition better than a row-based database ever could, so the main cost of a star schema's denormalisation shrinks while its join advantage stays exactly the same.

BI tools reinforce the same choice from the other direction. Power BI, Tableau and similar tools build their semantic layer around straightforward one-hop relationships between a fact table and its dimensions, and that model maps cleanly onto a star schema. Point the same tool at a snowflaked model and someone has to either flatten it in a view first or accept a more complicated relationship diagram that business users will not thank you for.

There is a loading-side benefit too. A denormalised dimension table can be populated with one write per batch, while a snowflaked dimension needs writes to several related tables kept in step with each other, plus the referential checks between them. For a nightly batch job that is manageable, but for a warehouse loading dimensions incrementally throughout the day, fewer moving parts means fewer places for a load to fail halfway through.

Do not confuse the snowflake schema with the Snowflake platform

The naming collision trips up a lot of people new to data warehousing. The snowflake schema is a modelling pattern, decades old, named for the shape of its entity relationship diagram. Snowflake the company is a cloud data platform, launched long after the pattern already had its name, and the two share nothing beyond the word.

A warehouse built on the Snowflake platform can run a star schema, a snowflake schema, or a mix of both; the platform has no preference and no built-in schema of that name. If a vendor conversation or a piece of documentation is ambiguous about which one is meant, it is worth asking outright, because the two questions (which dimensional model should we use, and which warehouse platform should we run it on) are entirely separate decisions.

When a snowflake schema still earns its place

The clearest case is a very large dimension with shared hierarchical attributes feeding several different fact tables. A product dimension with millions of rows, where category and supplier details are also used by a separate returns fact and a separate inventory fact, is a reasonable candidate for normalising out category and supplier, since keeping one authoritative copy avoids those facts drifting out of sync with each other.

It also earns its place where governance requires a single, auditable source for a reference attribute. If a compliance team needs to prove that a category classification only ever existed in one place and changed on one date, a normalised dimension gives a cleaner audit trail than the same attribute scattered across a denormalised table.

There is a hybrid worth knowing about too: a fact constellation, sometimes called a galaxy schema, where several fact tables share a set of conformed dimensions, some of which may themselves be snowflaked. This is less a third option than an acknowledgement that most real warehouses end up here anyway, with several fact tables sharing a common date or customer dimension rather than each living in its own isolated star.

Building a star schema that holds up

Start by defining the grain of the fact table precisely: one row per order line, one row per session, one row per shipped item. Get the grain wrong and every downstream dimension and every report built on top of it inherits the mistake. Keep dimension tables wide and readable, use surrogate keys rather than natural keys as the join columns, and decide upfront how you will handle slowly changing dimensions, since a customer's address or a product's category will change over time and the model needs a deliberate answer for what happens to historical facts when it does.

None of this works well bolted onto a warehouse that was never designed with reporting in mind, which is usually where teams call in help building a data foundation designed for analytics rather than retrofitting one after the dashboards have already started breaking.

Common mistakes to avoid

The most common one is drifting into a half-normalised model by accident: a few dimensions denormalised, a few snowflaked, with no consistent rule for which is which. That inconsistency is harder to reason about than either pattern applied deliberately, because every new report has to be checked against a different join path.

The second is over-normalising out of habit carried over from transactional database design. OLTP systems are built to avoid update anomalies, and that instinct pushes engineers toward normalising everything by default. A reporting warehouse has different priorities: read speed for a small number of predictable query shapes matters more than write efficiency for a large number of unpredictable ones, and the schema should be designed for the workload it will actually serve.

A third is ignoring slowly changing dimensions until it is too late. If a customer dimension simply overwrites an address when it changes, every historical fact joined to that customer now reports the new address against old transactions, silently rewriting history. Deciding upfront whether a dimension needs a plain overwrite or a versioned row for each change avoids that kind of quiet data corruption.

Frequently asked questions

What is a star schema?

A star schema is a dimensional model with one fact table holding measurable events, surrounded by denormalised dimension tables that each join directly to it. Because every dimension is a single join away from the fact table, queries stay simple and fast, which is why the pattern is the default choice for BI and reporting warehouses.

What is a snowflake schema?

A snowflake schema takes the same fact table but normalises its dimensions into further sub-tables, so a product dimension might split into product, category and supplier tables. It reduces duplicated attribute values and can improve data integrity, at the cost of extra joins to reach the same information.

Star schema vs snowflake schema: which is better?

Neither is better in every case. A star schema is generally the better default for analytics and BI because it needs fewer joins and performs well on modern column-store warehouses. A snowflake schema earns its place when a dimension is very large, shared across multiple facts, or needs a single normalised source for governance reasons.

Does using Snowflake as your warehouse mean you need a snowflake schema?

No. Snowflake the cloud platform and the snowflake schema modelling pattern share a name but nothing else. A warehouse running on the Snowflake platform can be modelled as a star schema, a snowflake schema, or a mix of both, and the platform itself has no preference either way.

Can a data warehouse mix star and snowflake schemas?

Yes, and many production warehouses do. A common approach is a star schema by default, with one or two very large or shared dimensions normalised out where it genuinely reduces duplication or supports governance. What matters is applying the choice deliberately per dimension rather than letting the model drift inconsistently.

Want a straight view of where AI can help your business first? Talk to us and start with a clear picture instead of a vendor demo.

Start at your core.

Tell us where your data is today and what you want AI to do. We will come back with a straight answer on what your foundation needs and where the quickest real win is.

Talk to us