The various types of SCD are described as follows:
- Type 1 dimension mapping (SCD1): This keeps only current data and does not maintain historical data.
Use SCD1 mapping when you do not want history of previous data.
- Type 2 dimension/version number mapping (SCD2): This keeps current as well as historical data in the table. It allows you to insert new records and changed records using a new column (PM_VERSION_NUMBER) by maintaining the version number in the table to track the changes. We use a new column PM_PRIMARYKEY to maintain the history.
Use SCD2 mapping when you want to keep a full history of dimension data, and track the progression of changes using a version number.
- Consider there is a column LOCATION in the EMPLOYEE ...