Handling Slowly Changing Dimensions (SCD)
Operational data makes its way into OLAP systems that comprise fact and dimension tables. The facts change frequently and are usually additive in nature. The dimensions do not change as often but they do experience some change, hence the name "slowly changing dimensions."
Business rules dictate how this change is to be handled and the various types of SCD operations reflect this. The following table lists them.
Of all these alternatives, types 1 and 2 are the most popular in the industry. In the next section, we will explore them in more detail.
SCD Type 1
This is fairly straightforward as there is no need to store the historical data; the newer data just overwrites the older data. Delta's MERGE
constructs come in handy. There is an initial full load of the data. New data is inserted, existing data is updated, and deletes remove the data altogether.