This is an extension of ER-Diagrams to Temporal Databases.
Example:
If an entity is temporal, we create an additional table EntityLifecycle
Employee
Name | BirthDate | Address | Salary | Projects |
---|---|---|---|---|
Peter | 8/9/64 | Rue de la Paix | 5000 | {MADS, HELIOS} |
EmployeeLifecycle
Name | FromDate | ToDate | Status |
---|---|---|---|
Peter | 7/94 | 6/96 | Active |
Peter | 7/96 | 6/97 | Suspended |
Peter | 7/97 | 6/98 | Active |
Note that there could be several type of lifecycle tables
Translating attributes
Employee
Name | BirthDate |
---|---|
Peter | 8/9/64 |
EmployeeLifecycle
Name | FromDate | ToDate |
---|---|---|
Peter | 7/94 | 7/98 |
EmployeeAddress
Name | Address | FromTime | ToTime |
---|---|---|---|
Peter | Bd St Germain | 1/85 | 12/87 |
Peter | Bd St Michel | 1/88 | 12/94 |
Peter | Rue de la Paix | 1/95 | now |
EmployeeSalary
Name | Salary | FromTime | ToTime |
---|---|---|---|
Peter | 4000 | 7/94 | 7/95 |
Peter | 5000 | 8/95 | now |
EmployeeProjects
Name | Projects | FromTime | ToTime |
---|---|---|---|
Peter | {MADS} | 7/94 | 8/95 |
Peter | {MADS, HELIOS} | 9/95 | now |
manager
- so it's temporalmanager
- adding an element to the manager historyproject.name
- just update the name project
- just update the name, but start a new history for manager
Temporality is inherited
Permanent
are implicitly temporalEmployee
but use the lifecycle of Employee
(don't have their own)
Student
and Faculty
have their own lifecycles
Employee
Name | BirthDate | Address |
---|---|---|
John | 3/7/55 | Bd Haussman |
Peter | 8/10/64 | Rue de la Paix |
WorksOn
Employee | Project | Hours | ||||||
---|---|---|---|---|---|---|---|---|
John | HELIOS |
| ||||||
John | MADS |
| ||||||
Peter | MADS |
|
Project
Name | Manager | Budget |
---|---|---|
MADS | Christine | 5000 |
HELIOS | Yves | 6000 |
Employee
, WorksOn
and Project
are not shown hereWorksOn
wasn't temporal, it wouldn't have a lifecycleEmployee
and Project