August 2017
Beginner to intermediate
426 pages
9h 36m
English
As you can see in the following table, we are maintaining the full history by adding new records to maintain the history of the previous records:
|
PM_PRIMARYKEY |
EMPLOYEE_ID |
NAME |
LOCATION |
PM_CURRENT_FLAG |
|
100 |
1001 |
STEVE |
INDIA |
0 |
|
101 |
1001 |
STEVE |
USA |
1 |
We add two new columns in the table: PM_PRIMARYKEY to handle the issues of duplicate records in the primary key in the EMPLOYEE_ID column, and PM_CURRENT_FLAG to understand current and history records.
Again, if Steve is shifted, the data looks like this:
|
PM_PRIMARYKEY |
EMPLOYEE_ID |
NAME |
LOCATION |
PM_CURRENT_FLAG |
|
100 |
1001 |
STEVE |
INDIA |
0 |
|
101 |
1001 |
STEVE |
USA |
0 |
|
102 |
1001 |
STEVE |
JAPAN |
1 |
Read now
Unlock full access