Rules for Column‑Level Foreign Key Constraints Only
The following rules apply to column-level foreign key constraints only.
The referencing column for a column‑level foreign key constraint is the column on which the foreign key constraint is defined by default.
This rule does not apply for Referential Constraints. In such cases, the candidate key acting as the primary key in the referenced table 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.
However, the candidate key in the relationship actually must always be unique even if it is not explicitly declared to be so. This is true by definition. See “Identifying Candidate Primary Keys” on page 90 and “PRIMARY KEY Constraints” on page 654 for details.
The uniqueness rule for candidate keys is necessary because the Optimizer always assumes that candidate keys are unique when it generates its query plans, and if that assumption is not true, it is not only possible to produce incorrect results to queries, but to corrupt databases. Because of this, you must always ensure that all candidate key values are unique even if they are not explicitly declared to be so.
As is always true when you specify Referential Constraints, you must assume responsibility for ensuring that any candidate key in a referential integrity relationship is unique, just as you must assume responsibility for ensuring that the referential relationship it anchors holds true in all cases, because Teradata Database enforces neither constraint.