Tag: Dimensional Model

The Fundamentals of Star Schemas

Introduction

If there is one data modeling concept that every data analyst, data engineer, and Power BI developer should understand, it is the star schema.

Although modern analytics platforms provide powerful capabilities for importing, transforming, and analyzing data, the quality of your reports ultimately depends on the quality of your data model. A well-designed star schema makes reports easier to build, improves query performance, reduces complexity, and helps ensure accurate calculations.

Whether you’re creating a Power BI semantic model, designing a Microsoft Fabric Warehouse, building an Azure SQL data warehouse, or developing a traditional enterprise data warehouse, the star schema remains the industry standard for organizing analytical data.


What Is a Star Schema?

A star schema is a data modeling technique that organizes data into two primary types of tables:

  • Fact tables
  • Dimension tables

The fact table sits in the center of the model, while the dimension tables surround it, creating a shape that resembles a star.

             Product
                |
Customer --- Sales Fact --- Date
                |
            Salesperson
                |
             Geography

This simple design makes it easy for reporting tools to aggregate data while allowing users to filter information by various business attributes. Star Schema models are sometimes called Dimensional Models.


Fact Tables

A fact table stores measurable business events.

Each row typically represents a single business transaction or event.

Examples include:

  • Sales transactions
  • Orders
  • Shipments
  • Inventory movements
  • Website visits
  • Financial journal entries

Fact tables usually contain:

  • Numeric values (sales amount, quantity, cost)
  • Foreign keys pointing to dimensions
  • Sometimes transaction identifiers

Example:

DateKeyProductKeyCustomerKeyQuantitySalesAmount
202607011258453$149.97
202607014502101$89.99

Notice that the fact table stores very little descriptive information. Instead, it references other tables.


Dimension Tables

Dimension tables describe the facts.

Rather than storing numbers, they store descriptive attributes used for filtering, grouping, and reporting.

Examples include:

  • Customer
  • Product
  • Date
  • Employee
  • Store
  • Vendor
  • Geography

A Product dimension might contain:

ProductKeyProductNameCategoryBrandColor
125Wireless MouseAccessoriesContosoBlack

A Customer dimension may include:

  • Customer Name
  • City
  • State
  • Country
  • Customer Segment
  • Industry

These tables provide the business context needed to interpret the facts.


Why Is It Called a Star Schema?

When diagrammed visually, the fact table appears in the middle while dimension tables radiate outward.

           Product

Customer  Sales  Date

         Geography

        Salesperson

Unlike more complicated database designs, each dimension typically connects directly to the fact table.

This simplicity is one of the reasons star schemas are so effective.


Relationships

In a star schema:

  • One dimension row relates to many fact rows.
  • Fact tables contain foreign keys.
  • Dimension tables contain primary keys.

For example:

Product
---------
ProductKey (Primary Key)
|
|
Sales Fact
----------
ProductKey (Foreign Key)

This creates a one-to-many relationship, which is ideal for analytical workloads.


What Is Granularity?

Granularity refers to the level of detail stored in the fact table.

Examples:

Daily Sales: One row per day.

Transaction Sales: One row per individual purchase.

Order Line Sales: One row for every item sold on an order.

The more detailed the granularity, the more flexible the reporting becomes.

Choosing the correct grain is one of the most important design decisions in a star schema.


Common Dimension Tables

Nearly every warehouse includes some common dimensions.

Date Dimension

Perhaps the most important dimension.

Contains attributes like:

  • Date
  • Year
  • Quarter
  • Month
  • Month Name
  • Week
  • Fiscal Year
  • Holiday Indicator

Instead of calculating these repeatedly, reports simply reference the Date dimension.


Product Dimension

Contains:

  • Product Name
  • Category
  • Subcategory
  • Brand
  • Color
  • Size
  • SKU

Customer Dimension

Contains:

  • Customer Name
  • Region
  • Industry
  • Segment
  • Customer Type

Geography Dimension

Contains:

  • Country
  • State
  • Province
  • City
  • Postal Code
  • Sales Territory

Measures vs Attributes

Understanding the difference between measures (stored in Fact tables) and attributes (stored in Dimension tables) is essential.

Measures (Fact Table)

  • Sales Amount
  • Cost
  • Quantity
  • Profit
  • Hours Worked

Attributes (Dimension Tables)

  • Product Name
  • Customer Name
  • State
  • Department
  • Month
  • Category

A simple way to think about it:

Numbers that are aggregated belong in fact tables. Descriptive information belongs in dimension tables.


Benefits of Star Schemas

1. Better Performance

Reporting engines such as Power BI are optimized for star schemas.

Fewer joins result in:

  • Faster queries
  • Better compression
  • Reduced memory usage

2. Simpler Reports

Users can easily understand:

  • Sales by Month
  • Sales by Customer
  • Sales by Product
  • Sales by Region

Instead of navigating dozens of interconnected tables, report authors work with a clean, intuitive model.


3. Easier Maintenance

Changes to one dimension rarely affect other dimensions.

Adding a new Product Category only requires updating the Product dimension.

The fact table usually remains unchanged.


4. Improved Data Quality

Because descriptive information is stored once, duplication is minimized.

For example, “Florida” exists once in a Geography dimension instead of appearing in millions of sales rows.


5. Scalability

Star schemas scale exceptionally well.

Many enterprise warehouses contain:

  • Billions of fact rows
  • Millions of customers
  • Hundreds of thousands of products

The design continues to perform efficiently.


Star Schema vs Flat Tables

Some beginners attempt to place every column into one enormous table.

While this may seem easier initially, it creates several problems:

  • Duplicate data
  • Larger storage requirements
  • Slower refreshes
  • Poor compression
  • Difficult maintenance

A star schema separates repeated descriptive information from transactional data, making the model both smaller and faster.


Star Schema vs Snowflake Schema

A related design is the snowflake schema.

Instead of storing all descriptive information in a single dimension, dimensions are normalized into multiple tables.

Example:

Product
|
Category
|
Department

Advantages:

  • Less duplicated data
  • Smaller dimension tables

Disadvantages:

  • More joins
  • More complicated reports
  • Slower query performance
  • Harder for business users to understand

For Power BI and most analytics solutions, a star schema is generally preferred.


Best Practices

When designing a star schema:

  • Determine the grain of each fact table before loading data.
  • Use surrogate keys for dimension relationships when appropriate.
  • Keep dimensions descriptive and facts numeric.
  • Avoid storing repeated descriptive data in fact tables.
  • Use conformed dimensions (such as Date or Customer) across multiple fact tables.
  • Create one-to-many relationships from dimensions to facts.
  • Keep the model as simple as possible.
  • Hide technical key columns from report consumers.
  • Use meaningful table and column names.
  • Document the purpose of each fact and dimension.

Common Mistakes to Avoid

New developers often make these mistakes:

  • Building one giant table containing everything.
  • Creating many-to-many relationships unnecessarily.
  • Using bidirectional filtering without a clear need.
  • Mixing transaction-level and summary-level data in the same fact table.
  • Including calculated totals in fact tables instead of calculating them in reports.
  • Storing descriptive text in fact tables.
  • Ignoring the importance of a proper Date dimension.

Avoiding these pitfalls leads to cleaner, more maintainable models.


Star Schemas in Power BI

Power BI is designed to work exceptionally well with star schemas.

Benefits include:

  • Faster report performance
  • Better DAX calculation behavior
  • Simpler filter propagation
  • Easier report development
  • Improved semantic model organization

Microsoft recommends using star schemas whenever possible when designing Power BI semantic models.


Real-World Example

Imagine a retail company tracking sales.

Sales Fact

  • Sales Amount
  • Quantity
  • Discount
  • Cost

Connected to:

  • Date
  • Customer (contains Customer Segment)
  • Product
  • Store (contains Region)
  • Employee
  • Promotion

Business users can easily answer questions such as:

  • Which products sold the most this month?
  • Which region generated the highest profit?
  • What is the average order value by customer segment?
  • Which promotions increased sales?
  • How did sales compare year over year?

This flexibility is one of the major reasons star schemas have become the standard for business intelligence.


Frequently Asked Questions

Can a star schema have multiple fact tables?

Yes. Many enterprise data warehouses include multiple fact tables, such as Sales, Inventory, Budget, and Returns, all sharing common dimensions like Date, Product, and Customer.

Why shouldn’t descriptive columns be stored in fact tables?

Doing so increases duplication, wastes storage, and makes updates more difficult. Dimension tables provide a single source of truth for descriptive information.

Are star schemas only used in Power BI?

No. Star schemas are widely used in Microsoft Fabric, Azure Synapse Analytics, SQL Server, Oracle, Snowflake, Amazon Redshift, Google BigQuery, and many other analytics platforms.

Is a star schema required?

Not always, but it is considered the best practice for most analytical reporting and business intelligence solutions because it balances simplicity, performance, and scalability.


Conclusion

The star schema is one of the most important concepts in modern analytics and data warehousing. By separating measurable business events into fact tables and descriptive business information into dimension tables, it creates a model that is easy to understand, efficient to query, and scalable for organizations of any size.

Whether you’re building dashboards in Power BI, designing a Microsoft Fabric Warehouse, or developing an enterprise data warehouse, mastering star schema fundamentals will help you create faster reports, more reliable analytics, and data models that are easier to maintain over time. A solid star schema is not just a design choice—it is the foundation of effective business intelligence.

Thanks for reading!

Prepare data for loading into a dimensional model (DP-700 Exam Prep)

This post is a part of the DP-700: Implementing Data Engineering Solutions Using Microsoft Fabric Exam Prep Hub.
This topic falls under these sections:
Ingest and transform data (30–35%)
   --> Design and implement loading patterns
      --> Prepare data for loading into a dimensional model


Note that there are 10 practice questions (with answers) at the end of each section to help you solidify your knowledge of the material. Also, there are 2 practice tests with 60 questions each available from the hub's main page below the exam topics section.

Introduction

One of the primary goals of data engineering is to transform raw operational data into a structure that supports efficient reporting, analytics, and business intelligence. In Microsoft Fabric, this often involves preparing data for loading into a dimensional model.

Dimensional modeling is a foundational concept in data warehousing and analytics. It organizes data into fact tables and dimension tables, enabling fast query performance, simplified reporting, and intuitive business analysis.

For the DP-700 exam, you should understand:

  • Dimensional modeling concepts
  • Fact and dimension tables
  • Star and snowflake schemas
  • Data preparation requirements
  • Surrogate keys
  • Slowly Changing Dimensions (SCDs)
  • Data cleansing and conformance
  • Loading sequence considerations
  • Fabric implementation patterns using Lakehouses, Warehouses, Notebooks, Dataflows Gen2, and Pipelines

Many DP-700 scenario questions focus on selecting the correct transformations and loading patterns to support dimensional models.


What Is a Dimensional Model?

A dimensional model organizes data into structures optimized for analytics rather than transaction processing.

The model consists primarily of:

  • Fact tables
  • Dimension tables

Example:

                Product Dimension
                        |
Customer Dimension --- Fact Sales --- Date Dimension
                        |
                 Store Dimension


This structure allows users to analyze business measures from multiple perspectives.


Why Use a Dimensional Model?

Dimensional models provide:

Improved Query Performance

Analytics queries often execute faster than on normalized transactional systems.

Easier Reporting

Business users can understand facts and dimensions more easily than complex normalized schemas.

Better Scalability

Supports large-scale reporting and analytical workloads.

Simplified BI Development

Tools such as Power BI work exceptionally well with dimensional models.


Fact Tables

Fact tables contain measurable business events.

Examples:

Fact TableBusiness Event
FactSalesSales transactions
FactOrdersCustomer orders
FactInventoryInventory balances
FactClaimsInsurance claims

Fact tables typically contain:

  • Numeric measures
  • Foreign keys to dimensions

Example:

SalesKeyDateKeyProductKeyCustomerKeySalesAmount
100120260101201501250.00

Dimension Tables

Dimension tables provide descriptive attributes used for filtering and grouping.

Examples:

DimensionExample Attributes
CustomerName, Region, Age
ProductCategory, Brand
DateYear, Month, Quarter
StoreLocation, Territory

Example:

CustomerKeyCustomerNameRegion
501Smith CorpEast

Understanding the Star Schema

The most common dimensional design is the star schema.

         Product
            |
Customer -- Fact Sales -- Date
            |
          Store


Characteristics:

  • Central fact table
  • Multiple dimensions
  • Simple joins
  • Excellent reporting performance

For DP-700, the star schema is typically the preferred analytical design.


Understanding the Snowflake Schema

A snowflake schema normalizes dimension tables.

Example:

Product
|
Category
|
Department

Advantages:

  • Reduced redundancy

Disadvantages:

  • More joins
  • Increased complexity

Most Fabric analytics workloads favor star schemas over snowflake schemas.


Data Preparation Before Loading

Raw source data rarely fits directly into a dimensional model.

Preparation typically includes:

  • Data cleansing
  • Standardization
  • Deduplication
  • Business rule application
  • Surrogate key generation
  • Data quality validation

Data Cleansing

Before loading dimensions and facts, incorrect data must be corrected.

Examples:

Inconsistent Values

FL
Florida
Fla

Standardized to:

Florida

Invalid Dates

01/45/2026

Must be corrected or rejected.


Handling Missing Values

Example:

CustomerIDEmail
101NULL

Possible approaches:

  • Default values
  • Unknown members
  • Data quality workflows

A common dimensional modeling practice is using “Unknown” dimension records.


Deduplication

Source systems often contain duplicate records.

Example:

CustomerIDName
100Smith
100Smith

Duplicates should be removed before loading.


Conformed Dimensions

A conformed dimension is shared across multiple fact tables.

Example:

Fact Sales
|
Customer Dimension
|
Fact Orders

Benefits:

  • Consistent reporting
  • Unified business definitions
  • Simplified analytics

DP-700 questions often reference conformed dimensions.


Surrogate Keys

Dimension tables typically use surrogate keys instead of business keys.

Example:

Source System:

CustomerID
CUST100

Dimension:

CustomerKeyCustomerID
501CUST100

Why Use Surrogate Keys?

Advantages include:

Independence from Source Systems

Source keys can change.

Improved Performance

Integer keys are more efficient than text values.

Support for Slowly Changing Dimensions

Surrogate keys help track historical changes.


Dimension Loading Sequence

Dimension tables are usually loaded before fact tables.

Why?

Fact tables require dimension keys.

Typical workflow:

Load Dimensions
Generate Surrogate Keys
Load Fact Tables

Key Lookup Process

During fact loading:

  1. Source business key identified
  2. Matching dimension record located
  3. Surrogate key retrieved
  4. Fact record loaded

Example:

CustomerID = CUST100
CustomerKey = 501
FactSales loaded

Slowly Changing Dimensions (SCD)

Dimensions often change over time.

Example:

Customer moves from:

Florida

to

Texas

The organization must decide how historical records should be handled.


SCD Type 1

Type 1 overwrites existing values.

Example:

Before:

CustomerState
SmithFlorida

After:

CustomerState
SmithTexas

History is lost.


SCD Type 2

Type 2 preserves history.

Example:

CustomerStateCurrent
SmithFloridaNo
SmithTexasYes

Benefits:

  • Historical reporting
  • Auditability
  • Trend analysis

Type 2 SCD is heavily tested in data engineering certifications.


Date Dimensions

Date dimensions are one of the most important dimensions.

Typical attributes:

DateKeyYearQuarterMonth
202601012026Q1January

Benefits:

  • Consistent date calculations
  • Faster reporting
  • Simplified filtering

Fact Table Preparation

Before loading facts:

Validate Measures

Example:

SalesAmount >= 0

Verify Foreign Keys

Ensure referenced dimensions exist.

Remove Invalid Records

Reject records with missing required fields.

Apply Business Rules

Example:

NetSales =
SalesAmount - DiscountAmount

Fact Table Granularity

Granularity defines the level of detail stored.

Examples:

Transaction-Level

One row per sale.

Daily Summary

One row per day.

Monthly Summary

One row per month.

The chosen grain should be clearly defined before loading.


Preparing Data in Microsoft Fabric

Several Fabric tools support dimensional modeling.


Dataflows Gen2

Useful for:

  • Data cleansing
  • Standardization
  • Deduplication
  • Business rule transformations

Best for low-code scenarios.


Notebooks

Useful for:

  • Complex transformations
  • Spark processing
  • SCD implementation
  • Large-scale dimension preparation

Common languages:

  • PySpark
  • Spark SQL

Data Pipelines

Useful for:

  • Orchestration
  • Scheduling
  • Parameterized execution
  • End-to-end ETL workflows

Fabric Warehouses

Useful for:

  • Dimensional storage
  • SQL-based transformations
  • Star schema implementation

Typical Fabric Dimensional Loading Pattern

Source Systems
Bronze Layer
(Raw Data)
Silver Layer
(Cleansed Data)
Dimension Processing
Fact Processing
Gold Layer
(Analytics Model)

This Medallion Architecture pattern is commonly used in Fabric implementations.


Common DP-700 Exam Scenarios

Scenario 1

A reporting system requires historical customer address tracking.

Best solution:

SCD Type 2


Scenario 2

A sales fact table references customer and product dimensions.

Best practice:

Load dimensions before facts.


Scenario 3

A product code changes in the source system.

Best solution:

Use surrogate keys.


Scenario 4

Multiple fact tables require consistent customer reporting.

Best solution:

Conformed dimensions.


Best Practices

Define Granularity Early

Determine the fact table grain before development.


Use Surrogate Keys

Avoid using business keys directly in fact tables.


Load Dimensions First

Fact loads depend on dimension keys.


Implement Data Quality Checks

Prevent invalid data from entering the warehouse.


Use Conformed Dimensions

Promote consistency across analytical models.


Preserve History When Needed

Use SCD Type 2 for historical reporting requirements.


DP-700 Exam Focus Areas

You should understand:

✓ Fact tables

✓ Dimension tables

✓ Star schemas

✓ Snowflake schemas

✓ Conformed dimensions

✓ Surrogate keys

✓ Business keys

✓ Fact table granularity

✓ Dimension loading strategies

✓ Fact loading strategies

✓ SCD Type 1

✓ SCD Type 2

✓ Data cleansing

✓ Data standardization

✓ Medallion Architecture support for dimensional models


Practice Exam Questions

Question 1

Which type of table stores measurable business events in a dimensional model?

A. Staging table

B. Dimension table

C. Lookup table

D. Fact table

Answer: D

Explanation

Fact tables store measurable events such as sales, orders, inventory quantities, and revenue.


Question 2

A data engineer needs to store customer attributes such as customer name, city, and region.

Which table type should be used?

A. Fact table

B. Bridge table

C. Aggregate table

D. Dimension table

Answer: D

Explanation

Dimension tables contain descriptive attributes used for filtering, grouping, and reporting.


Question 3

What is the primary advantage of a star schema?

A. More normalization

B. Simplified queries and better reporting performance

C. Reduced storage requirements

D. Elimination of dimensions

Answer: B

Explanation

Star schemas reduce join complexity and are optimized for analytical workloads.


Question 4

Which key type is typically used as the primary key in a dimension table?

A. Natural key

B. Foreign key

C. Composite key

D. Surrogate key

Answer: D

Explanation

Surrogate keys are system-generated identifiers that improve performance and support Slowly Changing Dimensions.


Question 5

A customer changes states from Florida to Texas, and historical reporting must be preserved.

Which Slowly Changing Dimension type should be used?

A. Type 0

B. Type 1

C. Type 2

D. Type 3

Answer: C

Explanation

Type 2 creates a new dimension record and preserves historical values.


Question 6

What should generally be loaded first during dimensional processing?

A. Dimension tables

B. Aggregate tables

C. Materialized views

D. Fact tables

Answer: A

Explanation

Fact tables require dimension keys, so dimensions are loaded first.


Question 7

Which activity is most commonly performed during data preparation for dimensional modeling?

A. Encrypting storage accounts

B. Data cleansing and standardization

C. Creating dashboards

D. Configuring network firewalls

Answer: B

Explanation

Data cleansing and standardization improve data quality before loading into dimensions and facts.


Question 8

A company wants multiple fact tables to use the same customer dimension.

What type of dimension should be implemented?

A. Slowly Changing Dimension

B. Role-playing Dimension

C. Junk Dimension

D. Conformed Dimension

Answer: D

Explanation

Conformed dimensions provide consistent business definitions across multiple fact tables.


Question 9

What is the primary purpose of a Date dimension?

A. Store transaction details

B. Manage security permissions

C. Provide standardized calendar attributes for reporting

D. Store surrogate key mappings

Answer: C

Explanation

Date dimensions simplify filtering, aggregation, and time-based reporting.


Question 10

A data engineer must ensure that every sales transaction is stored individually.

What fact table grain should be selected?

A. Monthly summary

B. Quarterly summary

C. Daily summary

D. Transaction-level detail

Answer: D

Explanation

Transaction-level grain stores one row per business event, providing the highest level of detail and analytical flexibility.


Exam Tip

For DP-700, remember this fundamental sequence:

Cleanse Data
Build Dimensions
Generate Surrogate Keys
Load Fact Tables
Publish Analytics Model

When an exam question discusses historical tracking, think SCD Type 2. When it discusses reporting performance and simplicity, think Star Schema. When it discusses multiple fact tables sharing the same business entity, think Conformed Dimension. These concepts appear frequently in real-world Fabric data warehouse implementations and certification exam scenarios.


Go to the DP-700 Exam Prep Hub main page.