136 private links
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.