On the Semantics of “Now” in Databases

James Clifford, Tomás Isakowitz, Curtis Dyreson, Christian S. Jensen, Richard T. Snodgrass

Research output: Contribution to journalArticle

93 Scopus citations

Abstract

Although “now” is expressed in SQL as CURRENT_TIMESTAMP within queries, this value cannot be stored in the database. However, this notion of an ever-increasing current-time value has been reflected in some temporal data models by inclusion of database-resident variables, such as “now”, “until-changed,” “⧜” “@,” and “-”. Time variables are very desirable, but their use also leads to a new type of database, consisting of tuples with variables, termed a variable database. This article proposes a framework for defining the semantics of the variable databases of the relational and temporal relational data models. A framework is presented because several reasonable meanings may be given to databases that use some of the specific temporal variables that have appeared in the literature. Using the framework, the article defines a useful semantics for such databases. Because situations occur where the existing time variables are inadequate, two new types of modeling entities that address these shortcomings, timestamps that we call now-relative and now-relative indeterminate, are introduced and defined within the framework. Moreover, the article provides a foundation, using algebraic bind operators, for the querying of variable databases via existing query languages. This transition to variable databases presented here requires minimal change to the query processor. Finally, to underline the practical feasibility of variable databases, we show that database variables can be precisely specified and efficiently implemented in conventional query languages, such as SQL, and in temporal query languages, such as TSQL2.

Original languageEnglish (US)
Pages (from-to)171-214
Number of pages44
JournalACM Transactions on Database Systems
Volume22
Issue number2
DOIs
StatePublished - Jan 1 1997

Keywords

  • Indeterminacy
  • Languages
  • Now
  • Performance
  • SQL
  • TSQL2
  • now-relative value
  • temporal query language

ASJC Scopus subject areas

  • Information Systems

Fingerprint Dive into the research topics of 'On the Semantics of “Now” in Databases'. Together they form a unique fingerprint.

  • Cite this