← Back to Glossary

Dimension table

A dimension table stores the descriptive, mostly-textual attributes — like customer name, product category, or region — that you use to filter, group, and label the measures in a fact table.

Overview

Dimension tables answer the "who, what, where, when, why" of a fact table's measures. A dim_customer table might hold customer_name, email, region, and segment; a dim_date table holds day_of_week, month, fiscal_quarter, and is_holiday. Each dimension has a primary key — usually a surrogate key — that the fact table references as a foreign key.

Compared to fact tables, dimensions are typically much smaller in row count (thousands to millions of rows versus billions) but wider, with many descriptive columns. They're also denormalized by convention in a star schema: a dim_product row repeats its category and department names directly rather than normalizing them into separate lookup tables, trading some redundancy for query simplicity.

Related terms

FAQS

There's no fixed limit, but dimensions are typically far smaller than the fact tables they describe — from a few rows (a boolean flag dimension) up to millions (a large customer or product dimension). If a dimension approaches the size of your fact table, reconsider whether it should be a dimension at all.