We propose a new approach to temporal extensions of SQL. Unlike the current proposals, e.g. SQL/Temporal, we use point-based references to time as the basis of our approach. The proposed language-SQL/TP-extends the syntax and semantics of SQL/92 in a very natural way: by adding a single data type to represent a linearly ordered universe of individual time instants. Such an extension allows the users to write temporal queries in customary fashion and vastly simplifies the semantics of the proposed language: we merely use the familiar SQL semantics. In this way SQL/TP also fixes many problems present in the semantics of the temporal query languages based on explicit interval-valued temporal attributes. In addition, we propose an efficient query evaluation procedure over a compact interval-based encoding of temporal relations. The algorithm is based on a sophisticated compilation technique that translates SQL/TP queries to SQL/92. In this way existing database systems can be used for managing temporal data. We substantiate this claim by proposing an experimental version of a SQL/TP compiler to serve as a front-end for DB2~1 (13).
展开▼