DB2 Version 10.1 for Linux, UNIX, and Windows

Manage and query time-based data using temporal tables

Use temporal tables associated with Time Travel Query to assign time-based state information to your data. Data in tables that do not use temporal support represents the present, while data in temporal tables is valid for a period defined by the database system, customer applications, or both.

For example, a database can store the history of a table (deleted rows or the original values of rows that have been updated) so you can query the past state of your data. You can also assign a date range to a row of data to indicate when it is deemed to be valid by your application or business rules.

For many businesses there are important reasons to preserve the history of data changes. Without this capability in the database, it is expensive and complex for businesses to maintain audit trails for regulatory compliance.

Many businesses also need to track the time period when a data row is deemed to be valid from a business perspective. For example, the time period an insurance policy is active. There might also be a need to store future data in tables, for instance, data that is not yet seen as valid by business applications.

Potential uses of temporal tables include:

It is expensive and technically complex for businesses to develop their own temporal support infrastructure, such as additional tables, triggers, and application logic. By using temporal tables, businesses can store and retrieve their time-based data without having to build, maintain, and administer complex temporal infrastructure.