Skip to content
BENIBIX Learn

Slowly Changing Dimension (SCD)

Data🗄️ Storage & WarehousingDimensional Modeling

Also known as SCD, SCD Type 2, Type 2 Dimension

A dimension whose details change over time. Type 2 keeps a row per version.

Think of it like

It is like a height chart on a door. You add a new mark each year and keep the old ones.

Example

Lucy moves from Leeds to London in May. With Type 2, her March orders still count for Leeds, and her June orders count for London.

Why it matters

Without it, old reports change when someone moves. Last year's sales by city would quietly shift.

Definition

A slowly changing dimension is a dimension whose details change now and then. A customer moves city, or a product gets a new price band. Type 1 just overwrites the old value, so history is lost. Type 2 adds a new row with start and end dates, so old facts keep their old details. Type 2 is the most common choice.

Common mistake

Writing over each change by default. You find out the past was lost when someone asks about last year.

Key takeaways

  1. 1
    Type 1. Overwrite and lose the old value.
  2. 2
    Type 2. Add a new row with dates.
  3. 3
    Keeps history. Old facts keep old details.