Database Reference
In-Depth Information
In what follows, the time dimension is assumed to represent valid time .
In the field of temporal databases , valid time is the time when the values
in a certain tuple are valid in the database, while transaction time is the
time when a tuple is recorded in the database. For example, if the salary of
an employee is recorded in the database on December 28, 2013, this will be
stored as its transaction time, but if it holds for the employee from January
1, 2014, the latter date will be recorded as the valid time for this attribute.
20
30
Salary
John
60
Salary
Mary
2012-01-01
2012-04-01
2012-07-01
2012-10-01
2013-01-01
2013-04-01
Fig. 12.1 Examples of temporal reals representing the evolution of salaries
Temporal types are partial functions, that is, they may be undefined for
certain periods of time. As an example, SalaryJohn and SalaryMary are values
of type temporal(real) , which represent the evolution of the salary of two
employees as depicted in Fig. 12.1 . For instance, John has a salary of 20 in
the period [2012-01-01, 2012-07-01) and a salary of 30 in the period [2012-
10-01, 2013-01-01), while the salary remains undefined in between 2012-07-01
and 2012-09-30. We denote by '
' this undefined value. As a convention, we
use closed-open intervals.
Table 12.1 Classes of operations on temporal types
Class Operations
Projection to domain/range DefTime, RangeValues, Trajectory
Interaction with domain/range IsDefinedAt, HasValue, AtInstant, AtPeriod,
InitialInstant, InitialValue, FinalInstant,
FinalValue, At, AtMin, AtMax
Rate of change
Derivative, Speed, Turn
Temporal aggregation
Integral, Duration, Length, TAvg,
TVariance, TStDev, TMin, TMax
Lifting
All new operations inferred
Temporal types have an associated set of operations, which can be grouped
into several classes, as shown in Table 12.1 . We discuss next these operations.
First, there are operations that perform the projection into the domain
and range of the function defining the temporal type. Operations DefTime
and RangeValues return, respectively, the projection of a temporal type
into its domain and range. For example, DefTime(SalaryJohn) and RangeVal-
ues(SalaryJohn) return, respectively,
{
[2012-01-01, 2012-07-01), [2012-10-01,
 
Search WWH ::




Custom Search