Bitemporal Model is used to monitor data that change by time.
Bitemporal Model save data in 2 directions, the first direction is the actual data, the second direction is the data that saved to database (the data that saved to database can different from the actual data).
For example: In January, salary of employee A in the system is $500. In early February, A's salary in the system is still $500 but to the end of February, HR said A's salary is $600 and this salary has been applied for 2 months (Jan and Feb).
In Bitemporal model we have these records:
Bitemporal Model save data in 2 directions, the first direction is the actual data, the second direction is the data that saved to database (the data that saved to database can different from the actual data).
For example: In January, salary of employee A in the system is $500. In early February, A's salary in the system is still $500 but to the end of February, HR said A's salary is $600 and this salary has been applied for 2 months (Jan and Feb).
In Bitemporal model we have these records:
user_id actual_date record_date salary 1 1/1/2023 1/1/2023 500 ---> In 1/1/2023 the system thought salary of user_id = 1 in 1/2023 is $500 1 1/2/2023 1/1/2023 500 ---> In 1/2/2023 the system thought salary of user_id = 1 in 1/2023 is $500 1 1/2/2023 1/2/2023 500 ---> In 1/2/2023 the system thought salary of user_id = 1 in 2/2023 is $500 1 21/2/2023 1/1/2023 600 ---> In 21/2/2023 the system thought salary of user_id = 1 in 1/2023 is $600 1 21/2/2023 1/2/2023 600 ---> In 21/2/2023 the system thought salary of user_id = 1 in 2/2023 is $600