What are Temporal Database Management Systems?
Non-Temporal DBMS
Commercial database management systems (DBMS) such as Oracle, Sybase, Informix andO2 are non-temporal DBMS since they do not support the management of temporal data. A temporal DBMS should support temporal data definition language, a temporal data manipulation language and a temporal query language, temporal constraints.Although some of the DBMS support data types for dates and time, they cannot be considered to be temporal DBMS. For example, the specification of a query considering several different database states (the history of data) is left to the user, without any support by the system.
Temporal DBMS
A temporal DBMS such as TimeDB supports- a temporal data definition language,
- a temporal data manipulation language,
- a temporal query language, and
- temporal constraints (such as temporal referential integrity).
Below you find a short introductionto the language SQL/Temporal used in TimeDB. More details about the implementation of TimeDB and the supported language can be found in[Ste98], [SBJS96a], [SBJS96b].
Temporal Data Definition Language
In TimeDB, a bitemporal table can be created the following way:- CREATE TABLE Employees (EmpID INTEGER, Name
CHAR(30), Department CHAR(40), Salary INTEGER)
AS VALIDTIME AND TRANSACTIONTIME;
Temporal Data Manipulation Language
The following statement inserts temporal data about John:- VALIDTIME PERIOD '1985-1990'
INSERT INTO Employees VALUES (10, 'John', 'Research', 11000);
VALIDTIME PERIOD '1990-1993'
INSERT INTO Employees VALUES (10, 'John', 'Sales', 11000);
VALIDTIME PERIOD '1993-forever'
INSERT INTO Employees VALUES (10, 'John', 'Sales', 12000);
Temporal Query Language
To query the data, the same keywords are used:- VALIDTIME
SELECT * FROM Employees;
- TRANSACTIONTIME
SELECT * FROM Employees;
- VALIDTIME AND TRANSACTIONTIME
SELECT * FROM Employees;
Temporal Constraints
Temporal integrity constraints can be expressed similarly. For example, a referential integrity constraint demanding that at each time instant an employee is a member of a department, the corresponding department itself must exist, can be expressed the following way:- CREATE TABLE Employees (EmpID INTEGER, Name
CHAR(30), Department CHAR(40) VALIDTIME REFERENCES Departments(department),
Salary INTEGER) AS VALIDTIME AND TRANSACTIONTIME;
Back to overview