What is Slowly changing Dimension?
Posted on | January 3, 2010 | No Comments
A slowly changing dimension is dimension table in which attribute changes with time.Suppose we have a customer who has bank account in Chicago.Now he changes his location and moves to new york.A dimension table for this customer will typically contain the following information
| Name | Age | City | Gender |
| Jack | 25 | Chicago | Male |
Now the challenge is to how to store this changing information.In a datawarehouse this is generally done in three ways.Accordingly such type of dimension are called type 1,type 2 and type 3
Type 1 Dimension
Type 1 dimension will not maintain history of the data at all.In the following example if the customer moves from one city to another.The new information will overwrite the old information.
Type 2 Dimension
As you remember in my previous article I explained we have surrogate key as primary key for dimension table.Now in type 2 dimension we maintain all the history.Suppose Jack is customer of bank he moves from Chicago to Miami and than to New york.The table will contain all this information in record form.Each time a new surrogate key is for created for each record.
Type 3 Dimension
Type 3 dimension will generally store limited history value.In most cases it will store the current and previous value..Suppose Jack is customer of bank he moves from Chicago to Miami and than to New york.Table will store Miami and New York.The information for Chicago will be deleted.
Comments
Leave a Reply