Introduction
One of the fundamental requirements of a data warehouse is the ability to preserve and manage historical data for analytical and decision-making purposes. In real-world business environments, dimensional attributes frequently change over time, creating challenges in maintaining both current and historical information efficiently. Slowly Changing Dimensions (SCDs) are widely used in data warehousing to address this issue by managing changes in dimensional data. Depending on business requirements and the nature of data changes, different SCD approaches such as Type 1, Type 2, Type 3, Type 4, and Type 6 are used to store and track historical information in different ways.
Solution
There are a few common types of SCDs and they differ based on how the attributes of dimensions behave when changes occur. These options are:
- Type 0 – Only the first version is retained. No further modifications are made.
- Type 1 – Only the last version is retained. Previous versions will be overwritten.
- Type 2 – When there is a change, a new record will be added per the current version. Previous versions will be set to previous versions and end-dated. This SCD is very common because it offers greater flexibility than other SCDs.
- Type 3 – Only the previous version is maintained in the same row version as another column. The challenge in this technique is that only the previous version is kept.
- Type 6 - hybrid approach that combines the features of Type 1, Type 2, and Type 3 SCDs to maintain full historical records while also supporting overwriting and tracking of previous attribute values within the same dimension table.
What is Type 4 SCD?
A Type 4 Slowly Changing Dimension (SCD) separates current and historical data into two distinct tables: one table stores the latest version of the dimension data, while another maintains the complete history of changes.
This approach is similar to the way operational systems often manage historical records separately from active data. Type 4 SCD is particularly useful when attribute values change frequently, as it helps improve query performance on current data while still preserving historical information for analysis and auditing purposes.
Sample Scenarios – Customer Loan Repayment
Consider a bank that monitors customer loan repayments every month. Each customer can have one of the following statuses as shown in the below figure. A customer’s payment status may change every month based on their repayment behavior, such as On-Time Payment, Minor Delay, Major Delay, or No Payment.

If these frequent changes are handled using a Type 2 Slowly Changing Dimension, a new version of the customer record must be inserted into the dimension table each time the status changes. Over time, this can cause the dimension table to grow rapidly with a very large number of records, leading to scalability and performance issues. In such situations, the original purpose of a “slowly” changing dimension becomes less meaningful because the attribute changes occur too frequently. For example, in a banking system with 50,000 customers, even if only 40,000 customers experience a status change each month, the warehouse would need to store at least 40,000 additional records monthly, resulting in significant storage and maintenance overhead.
The bank needs to maintain the latest customer payment status for operational and day-to-day reporting while also preserving historical payment behavior for purposes such as risk analysis, customer credit evaluation, compliance monitoring, and auditing. Since customer payment statuses may change frequently over time, the system must efficiently support both current and historical data management. This requirement makes Type 4 Slowly Changing Dimension (SCD) an appropriate solution, as it separates current records from historical records using dedicated current and history tables.
Implementation of Type 4 SCD
The following figure shows the high-level flow of the Type 4 SCD. This workflow illustrates the ETL process for implementing a Type 4 Slowly Changing Dimension (SCD). After extracting data from the source system, the incoming record is compared with the current dimension record to detect any changes. If no changes are found, the current record is simply updated or retained. If a change is detected, the existing record is first archived in the history table to preserve historical information, and then the current dimension table is updated with the latest attribute values. This approach ensures fast access to current data while maintaining a complete audit trail of historical changes.




