In normal scenarios the 
dimension tables tend to grow slowly. That is the reason, they are 
called slowly changing dimensions. Example: Location attribute of a 
customer changes very rarely. However the salary band of a customer is 
likely to change every year. These type of attributes causes the 
customer dimension table to grow rapidly.
SCD type 4 provides a solution to handle the rapid changes in the 
dimension tables. The concept lies in creating a junk dimension or a 
small dimension table with all the possible values of the rapid growing 
attributes of the dimension.
Example: Take a look at the following dimension attributes of customer
Example: Take a look at the following dimension attributes of customer
C_Id Name Location Age_band Salary_bandThe age band and salary band are going to change frequently. So create a separate small dimension table with only these attributes. The number of possible values of age band will be around 20 and salary band will be around 30. The total number of rows in the new dimension table are 20×30=60.
The new tables are
Table name : customer C_Id Name Location Table name: customer_mini M_id Age_band Salary_band Fact table: Id C_Id M_Id ----The dimension key of the new table should be maintained in the fact table. This way we can handle the rapid changes in the dimension table.
 
No comments:
Post a Comment