Skip to content

Slowing Changing Dimension (SCD) demystified – Part 1

May 3, 2012

SCD is a basically a concept that explains how historical data/values are stored within a data in a database.
There are three main scenarios namely Type I, Type II and Type III.

In this post, I will be discussing the Type I scenario and I promise to do the part 2 pretty soon. In Type I SCD, the old values in one or more attributes of the table are overwritten with new values thus the old not kept. To explain this further, let’s consider a simple employee data structure as shown below;

Figure I

BEFORE

AFTER

 

Figure I above shows the before state and the after state of the employee’s (John Lee) department information
It shows John’s department was changed from HR to IT. (NB: Click both Images to enlarge)

This change could be as a result of data being erroneously entered and from figure 1 it is clear that there is no way of tracking historical data once the data changes have been implemented. In this case, there is no way of telling what John’s former department was.

This is part 1 in my post on demystifying SCD, please stay tune for part 2 of this post.

Thank you

About these ads

From → SQL

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: