17.10 - Rules for Using Referential Constraints - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Detailed Topics

Advanced SQL Engine
Teradata Database
Release Number
July 2021
English (United States)
Last Update

Other than their not actually enforcing referential integrity, most of the rules for Referential Constraints are identical to those documented by FOREIGN KEY Constraints and REFERENCES constraints.

The exceptions are documented by the following set of rules that apply specifically to the specification and use of Referential Constraints.
  • You can specify Referential Constraints for both of the following constraint types.
    • FOREIGN KEY (FK_column_set) REFERENCES (parent_table_PK_column_set)
    • (NFK_column_set) REFERENCES (parent_table_AK_column_set)

      where NFK indicates non-foreign key and parent_table_AK_column_set indicates an alternate key in the parent table.

  • Referential Constraint references count toward the maximum of 64 references permitted for a table referenced as a parent even though they are not enforced by the system.
  • INSERT, DELETE, and UPDATE statements are not permitted against tables with unresolved, inconsistent, or non-valid Referential Constraints. This rule is identical to the rule enforced for standard and batch RI.
  • The candidate key acting as the primary key in the referenced table in the constraint need not be explicitly declared to be unique using the PRIMARY KEY or UNIQUE keywords or by declaring it to be a USI in the table definition.