You are on page 1of 2

Slowly changing dimensions

In this phase, we identify the slowly changing dimensions and also specify what
strategy (Type-1, Type-2, or Type-3) we use to handle the change.
What are slowly changing dimensions?
A slowly changing dimension is a dimension whose attributes for a record (row)
change slowly over time.
Assume that David is a customer of an insurance company called INS993, Inc.,
and first lived in Albany, New York. So, the original entry in the customer
dimension table had the record as shown in Table 5-18:
Table 5-18 Insurance customer dimension table
David moved to San Jose, California, in August, 2005. How should INS993, Inc.
now modify the customer dimension table to reflect this change? This is the
Slowly Changing Dimension problem.
There are typically three ways to solve this type of problem, and they are
categorized as follows:
Time ID Standard time Description Time indicator
1 0600 hours Early morning AM
2 1650 hours Evening PM
3 2400 hours Late night AM
Customer key Social security number Name State
953276 989898988 David New York
160 Dimensional Modeling: In a Business Intelligence Environment
 Type 1: The new row replaces the original record. No trace of the old record
exists. This is shown in Table 5-19. There is no history maintained for the fact
that David lived in New York.
Table 5-19 Type 1 change in customer dimension table
 Type 2: A new row is added into the customer dimension table. Therefore,
the customer is treated essentially as two people and both the original and
the new row will be present. The new row gets its own primary key (surrogate
key). After David moves from New York to California, we add a new row as
shown in Table 5-20.
Table 5-20 Type 2 change in customer dimension table
 Type 3: The original record is modified to reflect the change. Also a new
column is added to record the previous value prior to the change.
To accommodate Type 3 slowly changing dimension, we now have the
following columns:
Customer key
Customer name
Original State
Current State
Effective Date
After David moved from New York to California, the original information gets
updated, and we have the following table (assuming the effective date of
change is August 15, 2005):
Table 5-21 Type 3 change in customer dimension table
Customer key
(Surrogate key)
Social security number Name State
953276 989898988 David California
Customer key
(Surrogate key)
Social security number Name State
953276 989898988 David New York
953277 989898988 David California
Customer
key
Social
security
number
Customer

name
Original
state
Current
state
Effective
date
953276 989898988 David New York California August 15,
20