Monday, 22 December 2014

SCD Type 1 with example

SCD Type 1:

In this method the new record will replace the old record and there is no tracking for history.

Example:

In the below table we have an employee named as Anil bearing the the EID 503 and Address as JNTU. Same details reflected in target table/warehouse table. 


Source table: 


Target Table:



Now we have updated the Address JNTU as KPHB for the employee Anil. In this SCD Tpye 1 there is no history tracking, so it will update the target table record with new value.
Below is the updated target table.




Advanteges:

  • This is the most simple way to implement SCD in our warehouse, because we no need to store the previous details.

Disadvantages:

  • We will loose all the previous history and not possible to track the previous details. In above example, once the target table data updated, the employer couldn't find the previous address of the employee Anil. This is the major disadvantage in SCD Type1.

If we are sure, there is no need to maintain the history of the dimension table, then we can go for this SCD Type1 method.

Please leave a comment, if you have any question or need any clarifications. 

What is SCD and Types of SCD

What is Slowly Changing Dimension:


Slowly changing dimension used to determine, how the historical changes are handled in warehouse tables.
Consider an example, where the employee address is being changed and the employer want to keep the previous address of the employee, that is the situation where SCD comes into picture. we will discuss in detail about SCD in types of SCD.

Types of SCD:

There are mainly 3 types of slowly changing techniques are there. Please click on them to explore.
SCD Type 2
SCD Type 3