Hi all,
Here in this section, I will be going to give you a brief explanation on Slowly changing dimension.
Introduction:
As the name represents it, When a dimension changes over time we call it as a Slowly changing dimension. We can handle this type of situation in 3 types. these are
SCD type 1
SCD type 2
SCD type 3
Say for example consider the below example.
Customer-id Customer-name Address
12 Kullayappa Kuala Lampur
Now after some months the customer's adress has been changed to Singapore. and now the data looks like below.
Customer-id Customer-name Address
12 Kullayappa Singapore
SCD Type 1:
How SCD type1 approach deals now is, remove the historical data that has been presented and have the updated data only. In this case we could not able to track the historical data.
Here in this section, I will be going to give you a brief explanation on Slowly changing dimension.
Introduction:
As the name represents it, When a dimension changes over time we call it as a Slowly changing dimension. We can handle this type of situation in 3 types. these are
SCD type 1
SCD type 2
SCD type 3
Say for example consider the below example.
Customer-id Customer-name Address
12 Kullayappa Kuala Lampur
Now after some months the customer's adress has been changed to Singapore. and now the data looks like below.
Customer-id Customer-name Address
12 Kullayappa Singapore
SCD Type 1:
How SCD type1 approach deals now is, remove the historical data that has been presented and have the updated data only. In this case we could not able to track the historical data.
Example:
Customer-id Customer-name Address
12 Kullayappa Singapore
SCD Type 2:
SCD type 2 prefers to add a another record for new entry and identify those new records on version.
Example:
Customer-id Customer-name Address Version
12 Kullayappa Kuala Lampur 0
12 Kullayappa Singapore 1
SCD Type 3:
SCD type 3 suggest to add one more column for the new record instead of adding extra record.
Example:
Customer-id Customer-name Previous_Address Current_Address
12 Kullayappa Kuala Lampur Singapore
Folks, I have typed on my own and excuse for my typo errors , I am providing details as per my knowledge.
Customer-id Customer-name Address
12 Kullayappa Singapore
SCD type 2 prefers to add a another record for new entry and identify those new records on version.
Example:
Customer-id Customer-name Address Version
12 Kullayappa Kuala Lampur 0
12 Kullayappa Singapore 1
SCD Type 3:
SCD type 3 suggest to add one more column for the new record instead of adding extra record.
Example:
Customer-id Customer-name Previous_Address Current_Address
12 Kullayappa Kuala Lampur Singapore
Folks, I have typed on my own and excuse for my typo errors , I am providing details as per my knowledge.
No comments:
Post a Comment