What is a slowly changing dimension (SCD)?

A slowly changing dimension (SCD) is a dimension table whose descriptive attributes change gradually over time, like a customer's address or a product's category, and the techniques for handling that history. SCD types define whether you overwrite old values, keep versions, or track both current and prior.

Dimension attributes are not always static: a customer moves city, a product is re-categorised, a sales rep changes territory. How you handle those changes determines whether historical reports stay accurate.

The common SCD types:

  • Type 1 overwrite the old value; no history kept.
  • Type 2 add a new row per version, with effective dates, so history is preserved.
  • Type 3 keep a limited previous value in an extra column.

Type 2 is the workhorse for accurate historical analysis, it lets a sale be attributed to the region the customer was in *at the time*, not today.

iDBQuery works with whatever SCD approach your data uses. If your dimensions carry effective-date columns and versioned rows (Type 2), you can ask time-aware questions in plain language, 'sales by the region as it stood then', and iDBQuery writes the SQL to pick the correct version. Its semantic layer helps it recognise validity-date and current-flag columns, and every answer is cited back to the exact rows used, so you can confirm the historical attribution is right rather than accidentally applying today's values to the past.

Updated 2026-06-22