A generalised temporal algebra

https://doi.org/10.1016/j.datak.2005.03.012Get rights and content

Abstract

The algebra (TNA) of a generalised temporal database model supporting temporal relations nested to any finite depth is presented. The temporal nested relations consist of temporal nested attributes which are formed from temporal attributes together with the corresponding time-varying attributes. Therefore, the temporal dimension of the model is nested and is not integral with the corresponding time-dependent value. All the operations of the algebra are defined recursively and are proved to be closed. In particular, considering the natural join operation for temporal nested relations, different cases are presented, distinguished by the types and the nesting levels of the common attributes that participate in the natural join operation.

Introduction

The need of supporting time in the field of database technology is of major importance since information that changes over time must also be recorded. Therefore, the development of generalised facilities for the direct support of time in databases has been unavoidable.

Numerous researchers have developed alternative temporal database models [1], [5], [10], [13], [14], [15], [16]. It is remarkable, therefore, that there is still no widely accepted temporal query language and implementation available to users.

The proposed models can be divided into three categories, first normal form (1NF), partly non-first normal form (partly N1NF) and fully non-first normal form (fully N1NF) models. 1NF models do not allow attribute values to be sets of values or sets of tuples. N1NF models do not satisfy the 1NF assumption, in general. Partly N1NF models are N1NF models only in the way they incorporate the temporal dimension. Therefore, nested non-temporal data are not allowed in these models, as opposed to fully N1NF models.

The relaxation of the first normal form requirement to supporting fully nested relations and thus, organising data in a hierarchical structure where subrelations belong to relations, offers a major advantage since it enables data about an object to be represented within one relation rather than distributing it over several relations. Subsequently, the use of the join operation, the most expensive operation in terms of execution time, can be limited substantially.

From the above mentioned models only [16] is a fully N1NF model. Refs. [13], [14] are 1NF, while the rest are partly N1NF. Refs. [10], [14] are tuple timestamping temporal database models while all the others are attribute timestamping. Commonly, tuple timestamping are 1NF, whereas attribute timestamping relations can form N1NF relations or nested relations. However, even if [13] is in 1NF, attributes are timestamped since more than one time interval attribute can coexist in the same relation referring to different data. Therefore, it is not representational clear with which attributes each timestamp is associated. Additionally, data regarding the same object is not included in the same tuple; thus, the history of the object is split up into many tuples.

Complete formal semantics have been defined only in [10], [13] while the others give a partial formalization of their models. Aggregates are not included in [1], [5], [10], [16]. Ref. [14] seems to be more concerned with the implementation side of temporal databases and so, his proposed model does not in fact include an algebra. Recursion is not used in any operation definition of the above mentioned models. Heterogeneous tuples are supported in [13], [16]. Finally, [1], [5], [16] do not include an implementation, even a prototype partial one.

Based on these observations, a generalised temporal nested algebra (TNA) is defined in the present paper recursively, as an integration of temporal and nested database models in which the temporal dimension of the model is nested and is not integral with the corresponding time-dependent value as in other previous proposed temporal nested models (e.g. [5], [16]). In addition, all other static data can be nested to any finite depth, so that the full power of the nested and temporal features can be exploited within one model for the first time. The recursive definitions of the algebraic operations of the TNM offer direct manipulation of tuples either at the top or lower levels of the nested relations, without any restructuring, unnesting or nesting operations and queries are more compact, simple and naturally expressed.

The remainder of the paper is organised as follows. In Section 2 the structure of the TNA relations is presented. The basic concepts and terminology which are used in this paper are given in Section 3. The TNA is presented in Section 4 with appropriate examples whenever it is considered necessary. The closure property of the operations of the TNA is proved in Section 5. Finally, conclusion is presented in Section 6.

Section snippets

Representation of TNA relations

A relation in the TNA is a temporal nested relation which can be represented either in a tabular or in a tree representation. Specifically, for the tree representation, a relation R in the TNA can be described as a tree with root node R and with all the nested and temporal nested attributes, Rn and Rtn respectively, as non-leaf nodes of the tree and all the atomic and temporal attributes, Ra and Rt respectively, as leaves of the tree. In order for the attributes Ra and Rt to be distinguished,

Preliminaries

Some basic concepts are defined below, necessary for the subsequent sections.

Definition 1 Time domain

A time domain is a non-empty, finite, totally ordered set of consecutive elements of the same time type (e.g. years, hours, minutes, seconds) [12].

Definition 2 Time point

The elements of a time domain are called time points.

Definition 3 Time interval, TI

Time interval is the finite set of consecutive time points between two given time points.TI=[ti,tj)={tk|tkT,titk<tj},whereTisdefinedasthesetoftimepoints

Time intervals are closed to the left and open to the right [12].

Definition 4 Temporal element, TE

Operations in the TNA

In the general case, in the TNA, temporal data are represented as temporal attributes connected to the corresponding time-varying attributes. Each time-varying attribute together with the corresponding temporal attribute form a temporal nested attribute.

The operations of the algebra that are defined next are named according to their common names with the prefix “T” to denote their temporal version.

All of the relational algebra operations defined for flat relations are now redefined using

Closure property of the TNA operations

The temporal nested operations defined in Section 4 are proved, in this section, to be closed in U, where U is the underlying domain of the temporal nested relations. For all the following propositions, let r be a temporal nested relation with relation scheme R(Attr(Ra), Attr(Rt), Attr(Rtn)), where Attr(Ra) = {Ra1, Ra2,  , Rak} is the set of all atomic attributes (k  0), Attr(Rt) = {Rt1, Rt2,  ,Rtq} is the set of all temporal attributes (q  0) and Attr(Rtn) = {Rtn1, Rtn2,  , Rtnm} is the set of all temporal

Conclusion

In this paper, a temporal database algebra (TNA) has been defined for temporal nested relations. The advantage of this approach is that it combines for the first time a simple temporal extension with nested relational theory.

All the operators that are used are recursively defined. The result is that there is no need to flatten the temporal nested relations when queries are executed. Data duplication does not occur. Furthermore, the representation of the data is claimed to be in a “natural form”

Acknowledgement

The author would like to thank the referees for their helpful suggestions.

Georgia Garani received a BSc degree in physics from Aristotle University of Thessaloniki, Greece and MSc and Ph.D. degrees in computer science from King’s College and Birkbeck College respectively, University of London, UK. She worked as a teaching assistant at Birkbeck College and as a visiting lecturer at the University of North London, UK. She is currently an applications professor at the Department of Computer Science and Telecommunications of the Higher Technological Educational Institute

References (16)

  • L.S. Colby

    A recursive algebra for nested relations

    Information Systems

    (1990)
  • G. Garani et al.

    Joining nested relations and subrelations

    Information Systems

    (2000)
  • N.A. Lorentzos et al.

    Extending relational algebra to manipulate temporal data

    Information Systems

    (1988)
  • J. Clifford et al.

    On completeness of historical relational query languages

    ACM Transactions on Database Systems

    (1994)
  • C.J. Date

    An Introduction to Database Systems

    (2003)
  • J. Enderle, M. Hampel, T. Seidl, Joining interval data in relational databases, in: Proceedings of the ACM SIGMOD...
  • S.K. Gadia et al.

    Algebraic identities and query optimisation in a parametric model for relational temporal databases

    IEEE Transactions on Knowledge and Data Engineering

    (1998)
  • D. Gao et al.

    Join operations in temporal databases

    The VLDB Journal

    (2005)
There are more references available in the full text version of this article.

Cited by (4)

Georgia Garani received a BSc degree in physics from Aristotle University of Thessaloniki, Greece and MSc and Ph.D. degrees in computer science from King’s College and Birkbeck College respectively, University of London, UK. She worked as a teaching assistant at Birkbeck College and as a visiting lecturer at the University of North London, UK. She is currently an applications professor at the Department of Computer Science and Telecommunications of the Higher Technological Educational Institute of Larisa, Greece. She is involved in a series of research projects. Her research interests include temporal and spatial databases, image databases and data mining.

View full text