logo

Switzerland Campus

About EIMT

Research

Student Zone


How to Apply

Apply Now

Request Info

Online Payment

Bank Transfer

Fact Table vs. Dimension Table

Home  /   Fact Table vs. Dimension Table

TECHNOLOGY

Aug 18, 2025

Understand fact vs. dimension tables and how separating measures from attributes boosts accuracy, consistency, and scalability in data warehouses.

Modern business intelligence depends on a careful balance between performance and clarity. This balance is achieved through two specialized table types in data warehousing — Fact Tables, which capture measurable events, and Dimension Tables, which add the descriptive context that makes analysis possible.

Understanding their differences is essential for:

  • Data modelers designing a star schema or snowflake schema.
  • BI developers building dashboards.
  • Data analysts writing queries.
  • Business teams interpreting reports.

This article examines a detailed breakdown of Fact Tables and Dimension Tables, including definitions, examples, major differences, use cases, and best practice for designing them effectively.

 

What is the Difference Between a Fact Table and a Dimension Table?

Fact Table: Stores quantitative metrics (measurable values) of a business process, e.g., sales value, units sold, or profit.
Dimension Table: Stores descriptive information (context) regarding the facts, including product names, customer information, or store locations.

Key difference:

  • Fact Table = Numbers you measure
  • Dimension Table = Details that describe those numbers

 

What is a Fact Table?

 

Fact Table Definition

A Fact Table is the central table in a star schema or snowflake schema of a data warehouse. It contains:

  • Numeric measures (facts)
  • Foreign keys to dimension tables

These facts are typically aggregatable (sum, average, min, max).

Example of a Fact Table

Think of an e-commerce sales database. A sample Sales_Fact table might look like:

Date_Key

Product_Key

Customer_Key

Store_Key

Sales_Amount

Quantity_Sold

20230801

1002

5021

301

250

3

20230801

1003

5022

302

120

1

 

Here:

  • Sales_Amount and Quantity_Sold are facts.
  • Date_Key, Product_Key, Customer_Key, and Store_Key are foreign keys linking to dimension tables.

 

Types of Fact Tables

  1. Transaction Fact Table – Records individual transactions (e.g., sales receipts).
  2. Periodic Snapshot Fact Table – Captures data at regular intervals (e.g., monthly account balances).
  3. Accumulating Snapshot Fact Table – Tracks the progress of a process (e.g., order fulfillment).

Also read - AI for Strategic Planning: Leveraging Data for Long-Term Business Growth

 

What is a Dimension Table?

 

Dimension Table Definition

A Dimension Table contains descriptive attributes that provide context to the facts. It answers questions like “Who? What? Where? When? Why? How?” in relation to a fact.

Example of a Dimension Table

Using the previous e-commerce example, a Product_Dim table might look like:

Product_Key

Product_Name

Category

Brand

Launch_Date

1002

Wireless Mouse

Accessories

Logitech

2022-03-01

1003

Laptop Pro 15

Computers

Dell

2023-06-15

 

Here:

  • Product_Name, Category, and Brand describe the product.
  • Product_Key links this table to the fact table.

 

Types of Dimension Tables

  1. Conformed Dimension – Shared across multiple fact tables (e.g., Date Dimension).
  2. Junk Dimension – Stores miscellaneous attributes.
  3. Role-Playing Dimension – Same dimension utilized across multiple (e.g., Order_Date and Ship_Date).
  4. Slowly Changing Dimension (SCD) – Manages historical attribute changes (e.g., address changes on a customer).
     

Fact Table vs. Dimension Table – Detailed Comparison

Feature

Fact Table

Dimension Table

Purpose

Stores measurable metrics

Stores descriptive attributes

Content

Numeric values + foreign keys

Textual/contextual data

Size

Very large

Smaller than fact table

Granularity

Lowest level of detail for analysis

One row per entity

Keys

Composite key (foreign keys)

Primary key (single)

Aggregations

Frequently aggregated (SUM, AVG, etc.)

Rarely aggregated

Change Frequency

Changes often (new facts)

Changes slowly (attributes)

Storage

Mostly numeric

Mostly textual

 

Why the Distinction Matters in Data Modeling

 

Separating facts and dimensions is critical for:

  • Query performance: Dimension tables are smaller, making joins faster.
  • Data consistency: Shared dimensions (like Date) keep reporting aligned.
  • Flexibility: Adding new facts doesn’t require restructuring dimensions.
  • Scalability: Fact tables grow over time; dimensions remain relatively stable.

 

Fact and Dimension Tables in a Star Schema

In a Star Schema:

  • The Fact Table is at the center.
     
  • Dimension Tables surround it like points of a star.
     

Example:

          Date_Dim

              |

Product_Dim - Sales_Fact - Customer_Dim

              |

           Store_Dim

In a Snowflake Schema, dimensions may be normalized into multiple related tables.

 

Example Use Case: Retail Sales Data Warehouse

 

1.Fact Table: Sales_Fact

  • Facts: Sales_Amount, Quantity_Sold
  • Foreign Keys: Date_Key, Product_Key, Customer_Key, Store_Key
  • Date_Dim
  •  

2.Dimension Tables:

  • Date_Dim – Date, Month, Quarter, Year
  • Product_Dim – Product details
  • Customer_Dim – Demographics, region
  • Store_Dim – Store location, size

This separation enables fast, flexible reporting:

  • “Total sales by product category in Q2 2023”
  • “Top 10 customers by total spend last year”

 

Common Mistakes in Using Fact and Dimension Tables

  1. Mixing Facts and Dimensions – Leads to redundancy and performance issues.
  2. Not Defining Granularity Clearly – Causes confusion and incorrect aggregations.
  3. Overloading Fact Tables – Storing non-additive measures that don’t belong.
  4. Ignoring Slowly Changing Dimensions – Losing valuable historical context.
  5. Using Natural Keys Instead of Surrogate Keys – Risk of key changes breaking joins.

 

Best Practices While Designing Data Warehouses

  1. Define Granularity First – Decide the lowest level of detail for the fact table.
  2. Use Surrogate Keys – Avoid depending on natural keys that may change.
  3. Separate Measures and Attributes – Keep facts in fact tables, attributes in dimension tables.
  4. Index Foreign Keys – Improve join performance.
  5. Handle Slowly Changing Dimensions Properly – Choose SCD Type 1, 2, or 3 as needed.

FAQ:

Q1: How do a Fact Table and a Dimension Table differ in the key aspects?

A Fact Table holds numerical measures regarding business events, while a Dimension Table holds descriptive attributes that provide the context for those measures.

Q2: Is it possible for a Fact Table to be without a Dimension Table?

Technically, but in dimensional modeling, Fact Tables nearly always join Dimension Tables to provide useful analysis.

Q3: Are Fact Tables necessarily bigger than Dimension Tables?

Yes, by and large. Fact Tables capture all transactions or events, so they increase quickly. Dimension Tables hold quite static reference data.

Q4: Give an example of a retail Fact Table.

 A sales fact table with columns for date, product, customer, store, sales amount, and quantity sold.

Q5: What is a Slowly Changing Dimension (SCD)?

 A technique for tracking attribute change in a Dimension Table over time to provide historical accuracy.

Key Takeaways

  • Fact Table = measures + foreign keys
  • Dimension Table = descriptive attributes
  • They work together in a star or snowflake schema for efficient reporting.
  • Proper separation improves performance, scalability, and maintainability.

 

Conclusion

Grasping the difference between Fact Tables and Dimension Tables is essential for designing reliable and scalable data warehouses.
Keeping numerical measures separate from descriptive attributes helps organizations in:

  • Ensuring reporting remains accurate and consistent
  • Maintaining consistent reporting
  • Improving query performance
  • Scaling your analytics with ease

Whether you’re designing a retail sales warehouse, a hospital patient care system, or a financial reporting platform, the principles remain the same:

Facts tell you “how much,” whereas dimensions tell you “about what.”

And together, they make data analysis powerful, accurate, and actionable.