A star schema and a snowflake schema are two common ways to design a data warehouse for analytical queries. They define how fact and dimension tables are organized and related.
⭐ Star Schema
Structure:
A central fact table with foreign keys to several denormalized dimension tables.
Looks like a star: the fact table is at the center, and dimension tables radiate out.
Time
|
Product — Fact — Customer
|
Location
✅ Characteristics:
Dimension tables are flat (denormalized): all attributes in one table.
Simple structure, easy to query with JOINs.
Preferred for read-heavy analytical workloads.
✅ Pros:
Fast query performance (fewer joins)
Easy to understand and write SQL for
Optimized for OLAP tools (like Power BI, Tableau)
❌ Cons:
Data redundancy in dimensions
Less normalized = more storage
❄️ Snowflake Schema
Structure:
Similar to star schema, but dimension tables are normalized into sub-dimensions.
The “arms” of the star have branches — looks like a snowflake.
✅ Characteristics:
Dimension tables are normalized: broken into multiple related tables.