Slowly Changing Dimensions (SCDs) are a family of design patterns in dimensional data modeling — first formalized by Ralph Kimball — that govern how a data warehouse responds when descriptive attributes of dimension records change over time. Choosing the wrong SCD type silently corrupts historical reporting: a fact joined to an overwritten dimension loses the state that was true when the transaction occurred. The core trade-off is storage and complexity versus historical fidelity — and the patterns range from "never change anything" (Type 0) through full bi-temporal bookkeeping that tracks both real-world time and system-record time independently.
What This Cheat Sheet Covers
This topic spans 14 focused tables and 82 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Core SCD Types Overview
The seven canonical SCD types each represent a distinct policy for handling attribute changes. Understanding when each is appropriate is more important than memorizing their mechanics.
| Type | Example | Description |
|---|---|---|
INSERT new row; UPDATE old row SET end_date = today, is_current = FALSE | • Most widely used pattern. Preserves full history by inserting a new row for each change while closing the prior row with an end_date• enables accurate point-in-time reporting | |
UPDATE customers SET address = '123 New St' WHERE customer_id = 101 | • Destroys history — overwrites the existing value in place • use only when correcting bad data or when history is genuinely irrelevant | |
Column date_of_birth is never updated after initial insert | • The attribute value never changes once set • facts are always grouped by the original value • Suitable for truly immutable attributes such as SSN or original credit score | |
ALTER TABLE employees ADD COLUMN prev_department VARCHAR(100);UPDATE employees SET prev_department = current_department, current_department = 'Finance' | • Stores only one prior value in a new column • trades full history for simpler queries • suited to exactly-two-value comparisons (current vs. previous). |