In this lesson, you will learn how to decompose redundant dimension attributes into normalized sub-dimension tables to reduce data duplication and ensure consistency in a Snowflake schema.
Moving from Star to Snowflake
In a standard Star Schema, all descriptive attributes for an entity—like a Product—are kept in a single, wide table. However, if your Product table contains repeating information (like CategoryName or SupplierDetails), you end up storing that same text thousands of times. This redundancy wastes storage and risks "update anomalies," where a category name might be spelled differently in two different rows.
A Snowflake Schema solves this by normalizing these dimensions. You move repeating attributes into their own separate tables and link them back using keys.
A Concrete Example
Imagine a Product dimension. In a Star Schema, you might have:
| Product_ID | Name | Category_Name |
|---|---|---|
| 101 | Laptop | Electronics |
| 102 | Tablet | Electronics |
To normalize this into a Snowflake structure, you break the Category into a separate table:
Product_Dimension:
| Product_ID | Name | Category_ID |
|---|---|---|
| 101 | Laptop | 1 |
| 102 | Tablet | 1 |
Category_Dimension:
| Category_ID | Category_Name |
|---|---|
| 1 | Electronics |
Why Normalize?
- Data Integrity: If you need to rename "Electronics" to "Consumer Electronics," you update it in exactly one place (the
Category_Dimensiontable) rather than hunting through thousands of rows in a massiveProducttable. - Storage Efficiency: By replacing long strings with small integer keys, you reduce the overall physical footprint of your dimension tables.
- Refined Structure: It keeps your dimensions clean and logically grouped by specific business entities.
While the Star Schema is often preferred for query performance (because it avoids expensive "joins"), the Snowflake Schema is a powerful tool when your dimension attributes have a hierarchical structure that causes significant data duplication.
Key Takeaway: Normalizing dimensions into a Snowflake schema reduces data redundancy and simplifies maintenance by moving repeating attributes into their own related lookup tables.