<home

Basics of Temporal Data

A temporal database is a database that preserves not just the current state but also the historical state of information as it changes over time. The subject of a database is called the domain of discourse. In a non-temporal relational database, if the current state of the domain of discourse is represented in a relation, R{...}, with a key of {d}, then a temporal version of that same domain can be represented by a relation with a key of {d,t}, where t is the “time dimension” – an attribute or attributes that record a point in time or interval of time associated with each tuple.

{d} is called the domain key - the key that identifies instances of things in the domain of discourse. It is also called a business key or natural key.

t is referred to as the valid time or effective time of the data.

In everyday applications we are often interested in the duration of time over which a piece of data is valid and therefore t is usually understood to represent an interval of time rather than an instant in time. Since DBMSs don't necessarily support the concept of a single data type representing an interval of time, t may actually consist of two timestamps (ts and te) representing the start and end points of each time interval.

non-temporal (current state)

d

data

foo

104

bar

115

temporal

d

ts

te

data

foo

2011-01-01

2011-03-04

101

foo

2011-03-04

2011-04-10

104

bar

2011-01-01

2011-02-28

110

bar

2011-02-28

2011-04-10

115




REFERENCES
The above is my own interpretation of some of the ideas which are explained in more detail in these references.

Temporal Data and the Relational Model (Date, Darwen, Lorentzos), 2003
http://store.elsevier.com/product.jsp?isbn=9781558608559

A Logical Temporal Relational Data Model (Mahmood, Burney, Ahsan)
IJCSI International Journal of Computer Science Issues, Vol. 7, Issue 1, No. 1, January 2010
http://arxiv.org/ftp/arxiv/papers/1002/1002.1143.pdf

Managing Time in Relational Databases (Johnston, Weis), 2010
http://store.elsevier.com/product.jsp?isbn=9780123750419