Data modeling · Foundations

What is a dimension table?

Easydimensionattributesstar schemaBI

Interview question

What is a dimension table?

How to answer

The short answer

A describes the context around a fact: who bought, what product, which store, which date. Facts hold measures; dimensions hold the labels you filter and group by.

Output
dim_customer
  customer_sk   (surrogate key)
  customer_id   (natural / business key)
  name
  city
  segment
  valid_from / valid_to   (if SCD2)

Mental model

If the fact is the receipt total, dimensions are the customer name, store address, and calendar date printed on the receipt.

Typical dimensions

  • dim_date / dim_calendar
  • dim_customer
  • dim_product
  • dim_store / dim_geography

How BI uses them

SUM(amount) FROM fct JOIN dim_product GROUP BY category. The category lives on the dimension, not as a free-text string repeated without a key strategy.

Interview tip

> "Dimensions are descriptive; facts are measurable. Dimensions answer who/what/where/when; facts answer how much/how many."