Using Constraints with Temporal Tables | Temporal Table Support | Vantage - Using Constraints with Temporal Tables - Advanced SQL Engine - Teradata Database

Temporal Table Support

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
cjo1556732840654.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1182
lifecycle
previous
Product Category
Teradata Vantage™

Column or table level constraints defined on temporal tables can be associated with a time dimension, and are of three basic types:

Temporal Constraint Form Description
CURRENT VALIDTIME The constraint is applied to all current and future rows. History rows are not checked for constraint violations.
SEQUENCED VALIDTIME The constraint is applied to all future, current, and open history rows and ensures that the constraint is not violated at any instant of time in the valid-time dimension.
NONSEQUENCED VALIDTIME The constraint is applicable to all open rows in the table, and treats the valid-time column as a regular, nontemporal column. A nonsequenced constraint on a valid-time table is similar in semantics to a constraint defined on a nontemporal table.

For tables with transaction-time columns, nonreferential constraints are always considered to be current in the transaction-time dimension. These constraints are enforced only on rows that are open in transaction time. For bitemporal tables, constraints are enforced only on open rows that satisfy the valid-time constraint temporal qualifier.

Because constraints are not allowed on columns with a period data type, constraints are not allowed on valid-time or transaction-time columns.

To ensure application portability to ANSI standards for temporal SQL, Teradata recommends explicit specification of all temporal qualifiers.