A temporal database stores data relating to time instances. It offers temporal data types and stores information relating to past, present and future time. Temporal databases could be uni-temporal, bi-temporal or tri-temporal.
Dating from the early 1990s, development communities looked to develop specific guidelines for temporal databases in order to represent time frames for entries. Elements of temporal databases include “valid time” indicators and “transaction time” indicators. Experts describe the “valid time” as the time an entry is expected to be true or valid, and “transaction time” as an internal reference for databases. The valid time tables are also called “application time” tables, while transaction time tables can be referred to as “system version” tables.
Technologies including Oracle, Teradata and SQL have versions with temporal feature support.
Different uses of temporal databases require radically different types of development. For example, in a database of customer, patient or citizen data, indicators for individual people will follow a kind of life cycle timeline that can be created according to time frames for comment life events. By contrast, many industrial processes using temporal databases need extremely short valid time and transaction time indicators. These are rigidly implemented depending on length of time for various parts of business processes.
More specifically the temporal aspects usually include valid time, transaction time or decision time.
- Valid time is the time period during which a fact is true in the real world.
- Transaction time is the time at which a fact was recorded in the database.
- Decision time is the time at which the decision was made about the fact.
Features
Temporal databases support managing and accessing temporal data by providing one or more of the following features:
- A time period datatype, including the ability to represent time periods with no end (infinity or forever).
- The ability to define valid and transaction time period attributes and bitemporal relations.
- System-maintained transaction time.
- Temporal primary keys, including non-overlapping period constraints.
- Temporal constraints, including non-overlapping uniqueness and referential integrity.
- Update and deletion of temporal records with automatic splitting and coalescing of time periods.
- Temporal queries at current time, time points in the past or future, or over durations.
- Predicates for querying time periods, often based on Allen’s interval relations.
Uni-temporal
A uni-temporal database has one axis of time, either the validity range or the system time range.
Bi-temporal
A bi-temporal database has two axes of time:
- Valid time
- Transaction time or decision time
Tri-temporal
A tri-temporal database has three axes of time:
- Valid time
- Transaction time
- Decision time