On the Semantics of

While "now" is expressed in SQL as CURRENT-TIMESTAMP within queries, this value cannot bestored in the database. However, this notion of an ever-increasing current-time value has beenreflected in some temporal data models by inclusion of database-resident variables, such as"now," "until-changed," "∞," "@" and "-." Time variables are very desirable, but their usealso leads to a new type of database, consisting of tuples with variables, termed a variabledatabase.This paper proposes a framework for defining the semantics of the variable databases of temporalrelational data models. A framework is presented because several reasonable meaningsmay be given to databases that use some of the specific temporal variables that have appearedin the literature. Using the framework, the paper defines a useful semantics for such databases.Because situations occur where the existing time variables are inadequate, two new types ofmodeling entities that address these shortcomings, timestamps which we call now-relative andnow-relative indeterminate, are introduced and defined within the framework. Moreover, the paperprovides a foundation, using algebraic bind operators, for the querying of variable databasesvia existing query languages. This transition to variable databases presented here requires minimalchange to the query processor. Finally, to underline the practical feasibility of variabledatabases, we show that database variables can be precisely specified and efficiently implementedin conventional query languages, such as SQL, and in temporal query languages, suchas TSQL2.