Interview's MateData Engineer
Interview's Mate

Data Engineer

SQL · Spark · Lakehouse · Streaming

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Data Engineer topics
Lesson 47/ 160
03. Data Warehousing & Data Modeling

Star Schema vs Snowflake Schema vs Galaxy Schema

Trade simplicity of stars against snowflaked norms and multi-fact galaxy (constellation) designs.

IntermediateStar · Snowflake · Galaxy3 quiz questions
Practice Generative AI Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

In plain words

Filters, grouping, and joins. Next, star simplicity versus normalized ownership. Finally, row width, join plans, and BI usability.

Think of it like…

A star puts all labels on one spoke from the fact hub, snowflake makes smaller branch hubs, and a galaxy connects several event hubs through common reference points.

Where you’ve seen it

fact_sales joins directly to dim_product in a star; snowflake normalizes brand and category, while fact_sales and fact_returns form a galaxy around shared dim_product and dim_date.

Words you’ll hear

Star
Fact tables linked directly to denormalized dimensions for simple and usually efficient analytical joins.
Snowflake
A dimension hierarchy split into related normalized tables, trading join simplicity for centralized sub-entity ownership.
Galaxy
Multiple fact tables sharing one or more conformed dimensions, also called a fact constellation.
Operational boundary
Snowflaking a tiny product hierarchy adds joins without meaningful storage savings, while a galaxy assembled without shared definitions produces incompatible metrics despite a visually connected diagram. Start with a star for simple BI, snowflake only for separately governed or reusable hierarchy levels, and require conformed dimensions plus explicit grain for every fact in a galaxy.

Visual diagram

Loading interactive diagram

Theory & deep dive

Star: the working mechanism

A star schema joins facts directly to denormalized dimensions, a snowflake normalizes dimension hierarchies, and a galaxy/constellation links multiple fact processes through conformed dimensions.

Filters, grouping, and joins. Star simplicity versus normalized ownership, then conformed keys and grains; this exposes the state governed by Galaxy.

Star Schema vs Snowflake Schema vs Galaxy Schema in one concrete design

fact_sales joins directly to dim_product in a star; snowflake normalizes brand and category, while fact_sales and fact_returns form a galaxy around shared dim_product and dim_date.

Key takeaway: A star schema joins facts directly to denormalized dimensions, a snowflake normalizes dimension hierarchies, and a galaxy/constellation links multiple fact processes through conformed dimensions

Star Schema vs Snowflake Schema vs Galaxy Schema: failure mode and production response

Snowflaking a tiny product hierarchy adds joins without meaningful storage savings, while a galaxy assembled without shared definitions produces incompatible metrics despite a visually connected diagram.

Start with a star for simple BI, snowflake only for separately governed or reusable hierarchy levels, and require conformed dimensions plus explicit grain for every fact in a galaxy. Track Join depth as "star is commonly one edge from fact to dimension", and make Shared grain visible to the dataset owner.

Key takeaway: Start with a star for simple BI, snowflake only for separately governed or reusable hierarchy levels, and require conformed dimensions plus explicit grain for every fact in a galaxy.

How it works, step by step

Step 1 of 4
Star

1. State report patterns

Filters, grouping, and joins. A star schema joins facts directly to denormalized dimensions, a snowflake normalizes dimension hierarchies, and a galaxy/constellation links multiple fact processes through conformed dimensions.

filters, grouping, and joins
Key numbers at this step
Join depth
star is commonly one edge from fact to dimension
Snowflake
A dimension hierarchy split into related normalized tables, trading join simplicity for centralized sub-entity ownership.

When to use it & trade-offs

What it is

A star schema joins facts directly to denormalized dimensions, a snowflake normalizes dimension hierarchies, and a galaxy/constellation links multiple fact processes through conformed dimensions. fact_sales joins directly to dim_product in a star; snowflake normalizes brand and category, while fact_sales and fact_returns form a galaxy around shared dim_product and dim_date.

Why it matters: Snowflaking a tiny product hierarchy adds joins without meaningful storage savings, while a galaxy assembled without shared definitions produces incompatible metrics despite a visually connected diagram. Start with a star for simple BI, snowflake only for separately governed or reusable hierarchy levels, and require conformed dimensions plus explicit grain for every fact in a galaxy.

When to reach for it

  • Trade simplicity of stars against snowflaked norms and multi-fact galaxy (constellation) designs.
  • Choose Star because it provides this capability: Fact tables linked directly to denormalized dimensions for simple and usually efficient analytical joins.
  • Keep evidence for Join depth at "star is commonly one edge from fact to dimension" so the last production stage-Benchmark - row width, join plans, and BI usability-remains testable.

When to avoid or be careful

  • Snowflaking a tiny product hierarchy adds joins without meaningful storage savings, while a galaxy assembled without shared definitions produces incompatible metrics despite a visually connected diagram.
  • Do not conflate Snowflake with Star. The second concept contributes different behavior: A dimension hierarchy split into related normalized tables, trading join simplicity for centralized sub-entity ownership.
  • Release only after this guardrail is in place: Start with a star for simple BI, snowflake only for separately governed or reusable hierarchy levels, and require conformed dimensions plus explicit grain for every fact in a galaxy.

Star / Snowflake / Galaxy - roles, limits, and operating cost

Star
Best for: Fact tables linked directly to denormalized dimensions for simple and usually efficient analytical joins.

Strengths: Fact tables linked directly to denormalized dimensions for simple and usually efficient analytical joins. A star schema joins facts directly to denormalized dimensions, a snowflake normalizes dimension hierarchies, and a galaxy/constellation links multiple fact processes through conformed dimensions.

Watch out: Snowflaking a tiny product hierarchy adds joins without meaningful storage savings, while a galaxy assembled without shared definitions produces incompatible metrics despite a visually connected diagram.

Snowflake
Best for: A dimension hierarchy split into related normalized tables, trading join simplicity for centralized sub-entity ownership.

Strengths: A dimension hierarchy split into related normalized tables, trading join simplicity for centralized sub-entity ownership. In this workflow it supports: Align multi-fact semantics - conformed keys and grains.

Watch out: The operating cost is real: facts in a galaxy can differ but their conformed keys cannot be ambiguous.

Galaxy
Best for: Multiple fact tables sharing one or more conformed dimensions, also called a fact constellation.

Strengths: Multiple fact tables sharing one or more conformed dimensions, also called a fact constellation. Its output can be checked with Hierarchy reuse.

Watch out: Operating guardrail: Start with a star for simple BI, snowflake only for separately governed or reusable hierarchy levels, and require conformed dimensions plus explicit grain for every fact in a galaxy.

Interview signals & numbers to know

When this topic comes up

  • “Where is the failure boundary for Star, and how would Join depth reveal it?”
  • “Why is Snowflake distinct from this behavior: multiple fact tables sharing one or more conformed dimensions, also called a fact constellation?”
  • Production clue: Snowflaking a tiny product hierarchy adds joins without meaningful storage savings, while a galaxy assembled without shared definitions produces incompatible metrics despite a visually connected diagram.
  • Design probe: Start with a star for simple BI, snowflake only for separately governed or reusable hierarchy levels, and require conformed dimensions plus explicit grain for every fact in a galaxy.

Benchmarks & rules of thumb

Join depth -
star is commonly one edge from fact to dimension
Shared grain -
facts in a galaxy can differ but their conformed keys cannot be ambiguous
Hierarchy reuse -
snowflake only if normalized levels have measurable reuse or governance value

Common mistakes & follow-ups

Common interview mistakes

  • Snowflaking a tiny product hierarchy adds joins without meaningful storage savings, while a galaxy assembled without shared definitions produces incompatible metrics despite a visually connected diagram.
  • Reporting success from a job exit code without checking Join depth and Shared grain.
  • Treating this example as complete without replay, rollback, or access boundaries: fact_sales joins directly to dim_product in a star; snowflake normalizes brand and category, while fact_sales and fact_returns form a galaxy around shared dim_product and dim_date.

Likely interviewer follow-ups

  • How would you prove this contract instead of only checking that the command ran: Fact tables linked directly to denormalized dimensions for simple and usually efficient analytical joins.
  • What does the recovery plan do when this occurs? Snowflaking a tiny product hierarchy adds joins without meaningful storage savings, while a galaxy assembled without shared definitions produces incompatible metrics despite a visually connected diagram.
  • When is Star insufficient for Shared grain, and what does adding Snowflake cost in Join depth?
Interview tip: Lead with the data path and failure boundary: A star schema joins facts directly to denormalized dimensions, a snowflake normalizes dimension hierarchies, and a galaxy/constellation links multiple fact processes through conformed dimensions. Then make the answer operational: Start with a star for simple BI, snowflake only for separately governed or reusable hierarchy levels, and require conformed dimensions plus explicit grain for every fact in a galaxy.

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply Star Schema vs Snowflake Schema vs Galaxy Schema with data engineer interview Q&A and hands-on practice.

Open Data Engineer Q&A →Machine Learning Q&A
Previous topic
Dimension Tables & Conformed Dimensions
Next topic
Slowly Changing Dimensions (SCD Type 0, 1, 2, 3, 4 & 6)