BACKGROUNDThe set T denotes time values, and it is a total order under the "≤"relationship, hence allowing comparisons and calculations. The set T can be represented by integers (I) or real numbers (R). Time is continuous, and real numbers are a better approximation because they can easily accommodate time granularity. Because of its simplicity, time values in a calendar system are commonly implemented by the integers 0, 1, ... now. The symbol 0 is the relative origin of time, and now is a special symbol that represents the current time. Now advances according to the time granularity used. There are different time granularities, such as seconds, minutes, hours, days, months, years, and so forth (for a formal definition, see Betini, Jajodia, & Wang 1988).A subset of T is called a temporal set. A temporal set that contains consecutive time points {t 1 , t 2 , ..., t n } is represented either as a closed interval [t 1 , t n ] or as a half open interval [t 1 , t n+1 ). A temporal element (Gadia, 1988) is a temporal set that is represented by the maximal intervals corresponding to its subsets having consecutive time points. Temporal sets, intervals, and temporal elements can be used as time stamps for modeling temporal data and are essential constructs in temporal query languages. Temporal sets and temporal elements are closed under set-theoretic operations, whereas intervals are not. However, intervals are easier to implement. Time intervals, hence temporal elements and temporal sets, can be compared. The possible predicates are before, after, meet, during, and so forth. An interval or a temporal set (element) that includes now expends in its duration. Other symbols, such as forever or until changed, are also proposed as alternatives to the symbol now for intuitive handling of future data.There are various aspects of time in databases (Snodgrass, 1987). Valid time indicates when a data value becomes effective. It is also known as logical or intrinsic time. On the other hand, the transaction time (or physical time) indicates when a value is recorded in the database. User-defined time is application-specific and is an attribute whose domain is time. Temporal databases are in general append-only that is, new data values are added to the database instead of replacing the old values. A database that supports valid time keeps historical values and is called a valid time (historical) database. A rollback database supports transaction time and can roll the database back to any time in the past. Valid time and transaction time are orthogonal. However, a temporal database that supports both valid time and transaction time is capable of handling retroactive and post-active changes on temporal data. In the literature, the term temporal database is generically used to mean a database with some kind of time support. This chapter will focus on the valid time aspect of temporal data in relational databases. However, the discussion herein can easily also be extended to databases that support transaction time.
MODELING TEMPORAL DATAA...