Star Schema vs Snowflake Schema Architecture
Overview & Learning Objectives
The single most decisive factor in whether your Power BI dashboard is lightning-fast or dreadfully slow is your data model. Professional BI models separate data into two distinct categories: Fact tables (tall, numeric business events like sales or deliveries) and Dimension tables (wide, descriptive lookup tables like customers, products, and stores).
- Distinguish between Fact tables (measurements, transactions) and Dimension tables (attributes, context).
- Identify Primary Keys in Dimensions and Foreign Keys in Fact tables.
- Understand why a normalized relational model outperforms a single giant flat table.
Industry Standard
Standard: Analytics standards at McKinsey and Amazon strictly forbid building enterprise reporting dashboards on top of single flat, de-normalized tables; models must adhere to dimensional schema best practices.
Real-World Example: Scoop Master Ice Cream Creamery
Scoop Master records thousands of retail transactions daily across multiple stores, flavors, and dates.
| Table Name | Table Type | Key Type | Primary Contents |
|---|---|---|---|
| Fact_Sales | Fact Table | Foreign Keys (StoreID, FlavorID, DateKey) | Quantity, Total Bill (₹), Discount (₹) |
| Dim_Flavors | Dimension Table | Primary Key (FlavorID) | Flavor Name, Category, Base Cost |
| Dim_Stores | Dimension Table | Primary Key (StoreID) | Store Name, City, Store Manager |
| Dim_Calendar | Dimension Table | Primary Key (DateKey) | Full Date, Month, Quarter, Year |
Syntax & Core Workflow
Model View -> Drag Primary Key from Dimension Table (e.g. Dim_Stores[StoreID]) onto Foreign Key in Fact Table (Fact_Sales[StoreID])
Parameters Breakdown
Fact Table: Contains quantitative measurements, metric values, and foreign keys connecting to dimensions.Dimension Table: Contains descriptive attributes used to filter, slice, dice, and group fact calculations.Primary Key: A unique identifier column in a dimension where every value appears exactly once.Foreign Key: A reference column in a fact table that links back to a dimension primary key.
Sample Walkthrough (Q&A)
Question: Why should you NOT store Customer Address or Product Category inside a 5-million row Sales Fact table?
Formula / Action: Extract them into Dim_Customer and Dim_Product lookup tables.
Result: Drastically reduces memory footprint and avoids data duplication.
Explanation: Repeating text strings like "124 Indiranagar 100ft Road, Bengaluru" 5 million times wastes gigabytes of RAM. Storing it once in a dimension with an integer CustomerID saves massive memory.
Common Mistakes & Limitations
- Keeping everything in one single giant flat table imported from Excel, which causes DAX measures to run sluggishly and visuals to freeze.
- Creating relationships between two Fact tables directly instead of routing filters through shared Dimension tables.
Keyboard Shortcuts
| Action | Windows | Mac |
|---|---|---|
| Navigate to Model View | Ctrl + 3 | Ctrl + 3 |
| Fit Data Model to Screen | Ctrl + 0 | Ctrl + 0 |
Pro Tips & Modern Alternatives
- Always position Dimension tables at the top of the Model View canvas and Fact tables at the bottom ("waterfall layout") so filter flow is visually obvious.
- Hide Foreign Key columns in Fact tables from the Report View so report consumers only slice using Dimension attributes.