Beginner TrackBack
Beginner
🌱
Snowflake Schema
Understanding normalized dimensional modeling.
Section 1 of 2: Star vs Snowflake0%
Star vs Snowflake
Study Material
Snowflake Schema normalizes dimension tables into multiple related tables, creating a snowflake-like shape when visualized.
Visual Comparison:
Star Schema:
dim_product
dim_date ---- FACT ---- dim_customer
dim_store
Snowflake Schema:
dim_brand -- dim_category
\ /
dim_product
dim_date -- FACT -- dim_customer -- dim_geography
dim_store -- dim_region -- dim_country
What Gets Normalized:
In snowflake, dimension hierarchies are split into separate tables:
Star (denormalized):
dim_product contains: product_name, category, subcategory, brand
Snowflake (normalized):
- dim_product: product_name, category_key, brand_key
- dim_category: category_key, category_name, subcategory
- dim_brand: brand_key, brand_name
Trade-offs:
| Aspect | Star | Snowflake |
|---|---|---|
| Query Complexity | Simple (few JOINs) | Complex (more JOINs) |
| Query Performance | Faster | Slower |
| Storage | More (redundant) | Less (normalized) |
| ETL Complexity | Simpler | More complex |
| Dimension Updates | May need many updates | Single place |
| BI Tool Support | Excellent | Good |
| User-Friendly | Very | Moderate |
When to Use Snowflake Schema:
Storage costs are significant (very large dimensions)
Dimension hierarchies change frequently
Data governance requires single source of truth
Power users who understand complex models
When you need drill-through capabilities
When to Stick with Star Schema:
Query performance is top priority
Self-service BI for business users
Standard reporting use cases
Simpler maintenance preferred
When in doubt, start with star!