Dimension Table

A dimension table provides the descriptive context — the who, what, where, when, why — for the numeric measures stored in a Fact Table. Dimension tables are typically wide (many columns), shallow (fewer rows than fact tables), and denormalized in a Star Schema.

Common Dimensions

DimensionTypical Attributes
dim_dateyear, quarter, month, day, weekday, is_holiday, fiscal_period
dim_productname, category, subcategory, brand, sku, price_tier
dim_customername, segment, region, tier, acquisition_date
dim_storename, city, state, country, format, square_footage
dim_employeename, department, role, hire_date, manager

Slowly Changing Dimensions (SCD)

Dimension attributes change over time. How to handle this:

SCD TypeStrategyHistoryExample
Type 1Overwrite old valueNoneCustomer email changes — just update it
Type 2Add new row with versioningFullCustomer moves cities — new row with start_date, end_date, is_current
Type 3Add column for previous valueOne levelcurrent_city, previous_city
Type 4 (Hybrid)Combine multiple SCD techniques within the same dimensionMixedType 1 for email, Type 2 for city

Type 2 is the most common for analytical accuracy — it preserves the dimension value as it was when each fact was recorded. Type 4 (Hybrid) is used when different attributes within the same dimension have different change-tracking requirements.

Star vs Snowflake Dimensions