Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. What is a dimension table?

Data modeling · Foundations

What is a dimension table?

Easymodel-06
dimensionattributesstar schemaBI

Question

What is a dimension table?

Solution

A dimension table 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.

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."

PreviousNext