rodrigoavf.dev
← All writing

SCD Types Explained: Which Slowly Changing Dimension Fits Your Table

A practical breakdown of SCD Type 0 through Type 6, how each one works, what it costs, and which situations call for it.

13 min read

What a dimension is

In a data warehouse, tables generally split into two roles. Fact tables hold the events, a streaming session, a payment. Dimension tables hold the descriptive context around those events, who the subscriber was, what title they watched. If a fact table is a list of numbers and foreign keys, the dimension tables are what turn those keys into something a person can read: subscriber_key 701 becomes "Maria Santos, Basic plan."

A typical star schema has one fact table (fact_sessions, say) surrounded by several dimension tables it joins to: dim_subscriber, dim_title, dim_device, dim_date. Each row in dim_subscriber describes one subscriber; each row in fact_sessions points at a subscriber, a title and a device, then records the measure, like minutes watched.

session_idsession_datesubscriber_keytitle_keydevice_keyminutes_watched
502312026-04-0270112347
502452026-05-1870271112
503122026-06-2070112263

Each row is one session that already happened, and subscriber_key and title_key are foreign keys, pointers, not descriptions. Once a session row is recorded, it isn't supposed to change.

That's straightforward until a subscriber's details change after the fact has already happened. This is where the "slowly changing" part comes in, dimensions do change, far less often than the facts pointing at them, and how you handle that change determines whether your historical reports stay accurate or quietly rewrite themselves.

Take a concrete case: Maria Santos signs up for the Basic plan on 2024-01-10. In June 2026 she wants 4K streaming and more screens, so she upgrades to Premium. Same subscriber, new plan. Do you overwrite the old plan, keep it around, or do something in between? The answer is a Slowly Changing Dimension (SCD).

There are six commonly used SCD types (0, 1, 2, 3, 4 and 6, yes, 5 is skipped in most naming conventions because it never caught on as a standalone pattern). None of them is a "best" choice. Each one trades storage and query complexity for how much history it keeps, and the right pick depends on whether that history matters to the business.

I'll follow Maria through the same example table across every type: dim_subscriber, with plan_tier as the attribute that changes over time.

Type 0: Fixed, never changes

Some attributes are supposed to stay exactly as they were on day one. Original sign-up date, the country a subscriber first registered in, the promo code that acquired them. If the source system sends a corrected value, you ignore it. Type 0 is less a change-handling strategy than a deliberate decision that this column is immutable in the warehouse, regardless of what happens upstream.

subscriber_idsubscriber_namesignup_date
SUB-2044Maria Santos2024-01-10

Use it for: attributes where the historical, original value is the entire point, like a subscriber's original sign-up date or the acquisition channel that brought them in, and any "correction" from the source is treated as noise, not truth.

Type 1: Overwrite, no history

The simplest option. A new value comes in, you update the row in place, the old value is gone.

subscriber_keysubscriber_nameplan_tier
701Maria SantosBasic

Maria upgrades to Premium, the source sends the update, and after the load:

subscriber_keysubscriber_nameplan_tier
701Maria SantosPremium

No trace of Basic anywhere. Every fact table row joined to this subscriber, past and future, now reads "Premium" as the plan, even for sessions that happened while she was still on Basic.

Use it for: typo fixes, corrections, or attributes where past reporting should reflect the current state (a subscriber's current plan, not the plan they were on when a given session happened). If nobody would ever ask "what was this value last quarter," Type 1 is the right default.

Type 2: New row per change

This is the one people mean when they say "SCD" without qualifying it. Instead of updating the row, you close it out and insert a new one, with effective_date, end_date and usually an is_current flag.

subscriber_keysubscriber_idplan_tiereffective_dateend_dateis_current
801SUB-2044Basic2024-01-102026-06-14false
802SUB-2044Premium2026-06-159999-12-31true

subscriber_key is a surrogate key, unique per version. subscriber_id is the stable business key that ties both rows to the same real subscriber. A session that happened in April joins to subscriber_key 801 and correctly shows Basic, even though Maria is on Premium now.

-- Closing out the old row and inserting the new one
update dim_subscriber
set end_date = '2026-06-14', is_current = false
where subscriber_id = 'SUB-2044' and is_current = true;
 
-- Then insert the new row
insert into dim_subscriber (subscriber_id, plan_tier, effective_date, end_date, is_current)
values ('SUB-2044', 'Premium', '2026-06-15', '9999-12-31', true);

Use it for: any attribute where getting the historical value wrong would misstate a past report. Plan tier at the time of a session, subscription price at the time of a charge, sales territory. This is the default choice when in doubt, because it's the only type that fully protects historical accuracy.

The cost: the table grows with every change, and every query needs to either filter on is_current or join on a date range depending on whether it wants "now" or "as of then." For a dimension with frequent, high-cardinality changes, that growth adds up fast.

Type 3: One extra column for the previous value

Instead of a new row, you add a column that holds the prior value.

subscriber_keysubscriber_namecurrent_planprevious_plan
701Maria SantosPremiumBasic

No new rows and no surrogate key versioning, only one column tracking one step back. If Maria changes plans again, previous_plan gets overwritten and the value before that is gone for good.

Use it for: cases where you need a "before vs. after" comparison and nothing older than that, like measuring the immediate impact of a plan upgrade on spending. It's a narrow tool. The moment someone asks "what was their plan two changes ago," Type 3 can't answer.

Type 4: A separate history table

Keep the main dimension table Type 1 (fast, current-only, one row per entity), and push every change into a second table that logs the full history.

dim_subscriber (current):

subscriber_idplan_tier
SUB-2044Premium

dim_subscriber_history:

subscriber_idplan_tierchanged_at
SUB-2044Basic2024-01-10 09:00
SUB-2044Premium2026-06-15 14:22

Reports and dashboards that only need "who is this subscriber right now" hit the lean current table. Anyone who needs a full audit trail queries the history table separately.

Use it for: high-change-frequency attributes where you don't want the operational dimension table bloated with Type 2 rows, but compliance or audit requirements still demand a complete change log somewhere.

Type 5: Type 1 pointer into a Type 4 mini-dimension

Type 5 doesn't get much airtime because it's Type 4 with one extra piece bolted on, solving a fairly specific problem rather than introducing a new mechanism.

Type 4 already splits a dimension into a stable base table and a fast-changing mini-dimension (say, dim_subscriber for name and plan, plus dim_engagement_band for things like watch-hours band or device-count band that shift constantly). The mini-dimension holds one row per distinct combination of values, not one row per subscriber, and an engagement_key on the fact table pins each session to whatever combination was true at the time.

The gap Type 4 leaves open: if you want "this subscriber's current engagement band," you have to filter the mini-dimension history for the latest row, every time. Type 5 closes that gap by adding a column to the base dimension, current_engagement_key, that gets Type-1-overwritten every time the subscriber's engagement changes, always pointing straight at their current mini-dimension row.

subscriber_idplan_tiercurrent_engagement_key
SUB-2044Premium42
engagement_key | watch_hours_band | device_count_band
42               | 20-40 hrs/mo      | 3-4 devices
17               | 5-20 hrs/mo       | 1-2 devices

A "current engagement by plan" report joins dim_subscriber straight to dim_engagement_band on current_engagement_key, no filtering for the latest row needed. A historical fact-based report still joins the fact table's own stored engagement_key to get the combination that was true at the time of that session. Same mini-dimension, two different join paths depending on whether you want now or then.

Use it for: very specific setups where a mini-dimension (Type 4) is already justified by attribute volatility, and current-state lookups against it are frequent enough that re-filtering the mini-dimension every time is a real cost. It's rare. Most teams that reach for a mini-dimension either don't need the fast "current" pointer, or add an is_current flag to the mini-dimension row itself instead of maintaining a separate pointer column. That's the whole reason Type 5 tends to get a one-line mention instead of its own worked example, it's a real, valid pattern, a niche one layered on top of Type 4 rather than a distinct way of thinking about change.

Type 6: The hybrid (1 + 2 + 3)

Combines all three: Type 2 row versioning for full history, a Type 1 style overwrite of a "current value" column on every historical row so it's always up to date, and a Type 3 style "previous value" column for quick before/after comparisons.

subscriber_keyplan_historicalcurrent_planprevious_planeffective_dateend_dateis_current
801BasicPremiumBasic2024-01-102026-06-14false
802PremiumPremiumBasic2026-06-159999-12-31true

Notice current_plan says "Premium" on both rows, including the historical one. That means you can filter the entire table by "everyone currently on Premium" without joining to find the current row first, while plan_historical still tells you what the plan was during that specific period.

Use it for: dimensions that get queried both ways constantly, historical accuracy and current-state lookups, often enough that the extra update on every historical row (to keep current_plan in sync) is worth paying for.

Comparing them side by side

TypeHistory keptStorage impactQuery complexityTypical use case
0N/A, value never changesNoneNoneSubscriber signup date, acquisition source
1NoneNoneLowTypo fixes, "current state" attributes
2Full, one row per versionHighMediumPlan tier at the time of a session
3One step back onlyLowLowQuick before/after plan comparisons
4Full, in a separate tableMediumMedium (two tables)Audit trail without slowing the main table
5Full, via mini-dim + current pointerMediumMedium-High (two tables)Fast current-state lookups on top of a mini-dimension
6Full, plus always-current viewHighMedium-HighHeavy use of both historical and current queries

Does SCD apply to fact tables too?

No, not by name. SCD is a dimensional modeling term, describing how dimension tables handle change. Fact tables run on a different assumption: once an event is recorded, it happened, and it stays that way. A session that happened on June 15th stays a session that happened on June 15th forever. That's what makes facts additive and trustworthy in the first place, if the rows underneath a summed total could shift after the fact, nothing built on top of them would hold up.

That said, two situations in fact tables look similar to what SCD solves. They go by different names.

Accumulating snapshot fact tables. Some processes have a known set of milestones an order moves through: placed, picked, shipped, delivered. Instead of one row per event, an accumulating snapshot table keeps one row per order and updates it in place as each milestone happens, filling in ship_date, then later delivery_date. The row does change over its lifetime, but this isn't SCD. It's a distinct fact table pattern (alongside transaction fact tables and periodic snapshot fact tables) built for tracking a process, not for reflecting attribute changes on an entity.

Corrections and adjustments. When a recorded measure turns out wrong, a refund or a pricing error, the standard practice is to insert a new adjusting row rather than overwrite the original. The original sale stays exactly as it was reported at the time, and a second row nets it out or corrects it. It's philosophically close to what Type 2 does for dimensions, don't destroy the historical record, but in fact table land it's called a correcting transaction or adjustment entry. There's no numbered taxonomy for it the way there is for dimensions.

SCD vocabulary belongs to dimension tables. Fact tables run their own separate set of patterns for handling change, and none of them borrow the "Type 1 / Type 2" naming.

Trade-offs that matter

The real decision isn't "which type is best," it's "what does getting this wrong cost me." Overwriting an attribute that feeds historical reporting (Type 1 where you needed Type 2) quietly rewrites the past, every fact row that joins to that dimension shifts its meaning the moment the update runs. You won't notice until a report that used to make sense stops matching what happened.

Going the other way, versioning an attribute that never needed history (Type 2 where Type 1 would've done) bloats the table and forces every downstream query to deal with is_current filters or date-range joins it didn't need to.

Type 4 exists to avoid making that trade-off table-wide: it lets the current table stay Type 1 fast while the history still exists somewhere else. Type 6 exists for the opposite pressure, when you're tired of choosing between "give me history" and "give me current state" queries and want one table to answer both.

The rule of thumb

Start every attribute at Type 1. Only move it to Type 2 if you can name a real report or fact table join that would be wrong without the historical version. Reach for Type 3 only when the ask is "just the last value," never as a cheaper stand-in for Type 2. Use Type 4 when audit or compliance needs conflict with keeping the operational table fast. Type 6 is worth the extra complexity only once you've confirmed both historical and current-state queries are common enough to justify maintaining two derived columns on every row.

Most dimension tables end up as a mix, Type 1 for most columns and Type 2 for the two or three attributes that drive historical reporting. Trying to pick one type for the whole table is usually a mistake.