Managing time in DB2 with temporal consistency

Enforce time-based referential integrity

From the developerWorks archives

Matthias Nicola and Martin Sommerlandt

Date archived: January 13, 2017 | First published: July 12, 2012

The new temporal features in IBM® DB2® 10 provide rich capabilities for time-based data management. For example, a date range can be assigned to each row of data to indicate when a row is deemed valid by your applications or business. Tables enabled to track such business validity are called application-period temporal tables and their business time periods can be in the past, present, or future. For a parent table and a child table that have a foreign key relationship, the notion of referential integrity can be extended to consider not only the traditional key value but also the business time period of any given row. This article explains such temporal referential integrity and how time-based consistency can be enforced in DB2. The content of this article is applicable to DB2 for z/OS® and DB2 for Linux®, UNIX®, and Windows®; all included SQL samples were tested in DB2 10.1 for LUW.

This content is no longer being updated or maintained. The full article is provided "as is" in a PDF file. Given the rapid evolution of technology, some steps and illustrations may have changed.



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management
ArticleID=824516
ArticleTitle=Managing time in DB2 with temporal consistency
publish-date=07122012