August 2017
Beginner to intermediate
426 pages
9h 36m
English
As you can see in the following table, we are maintaining the history by adding new columns:
|
PM_PRIMARYKEY |
EMPLOYEE_ID |
NAME |
LOCATION |
PM_PREV_LOCATION |
|
100 |
1001 |
STEVE |
USA |
INDIA |
An optional column PM_PRIMARYKEY can be added to maintain the primary key constraints. We add a new column PM_PREV_LOCATION in the table to store the changes in the data. As you can see, we added a new column to store data as against SCD2,where we added rows to maintain history.
If Steve is now shifted to JAPAN, the data changes to this:
|
PM_PRIMARYKEY |
EMPLOYEE_ID |
NAME |
LOCATION |
PM_PREV_LOCATION |
|
100 |
1001 |
STEVE |
JAPAN |
USA |
As you can notice, we lost INDIA from the data warehouse, that is why we say we are maintaining ...
Read now
Unlock full access