internalsGet Pro

Module 05 · Lesson 4 of 12Pro

Star and snowflake schemas

Level
Intermediate
Topic
Data modeling for analytics
Reading time
18 min

When you finish this page you can

  1. Tell a star schema from a snowflake schema by how many hops each dimension is from the fact table.
  2. Flatten a category tree into fixed level columns once, in the nightly build, and check that it still fits.
  3. Estimate what flattening costs in storage and joins, and show why it is rarely the deciding factor.
  4. Decide when a dimension should stay split: a fact at a coarser grain, a large sub-entity, or a tool that needs it.

Builds on 2 lessons

Start with lesson 317 min
  1. Dimensional modeling: facts and dimensions17 min
  2. Recursive queries: hierarchies and graphs in SQL18 min

Monday’s revenue lost ₹81 lakh in a join chain

is an online store in India. Every night, Meera, Kartly’s data engineer, loads the day’s orders and clicks from a PostgreSQL read replica into a file on one 8 GB server. Daniel, who leads finance reporting, reads the numbers at 07:00.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan