Jump to content

Tuple-versioning

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Muntfish (talk | contribs) at 15:31, 8 February 2005 (links). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Tuple-versioning techniques have been developed to deal with the problem that relational database management systems capture only a single logical consistent state of the modeled reality, usually the current state. If it is desired to store past states of a relation, then the relational approach appears to break down.

Using tuple-versioning techniques, typically two values for time are stored with each tuple: a start time and an end time. These two values indicate the validity of the rest of the values in the tuple.

Typically when tuple-versioning techniques are used, the current tuple has a start time and a null value for end time. Therefore, it is easy and efficient to obtain the current values for all tuples by querying for the null end time.

A single query that searches for tuples with start time less than and end time greater than a given time, where null end time is treated as a value greater than the given time, will give as a result the valid tuples at the given time.

For example, if a person's job changes from Engineer to Manager, there would be two tuples in an Employee table, one with the value Engineer for job and the other with the value Manager for job. The end time for the Engineer tuple would be the start time for the Manager tuple.

Tuple-versioning techniques have also been called point-in-time techniques.

References

  • Comparison of Access Methods for Time-Evolving Data, by Betty Salzberg and Vassilis J. Tsotras, ACM Computing Surveys, Vol. 31, No. 2, June 1999.