Referential Integrity | SQL Fundamentals | Teradata Vantage - Referential Integrity - Advanced SQL Engine - Teradata Database

SQL Fundamentals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
uhe1592872955107.ditamap
dita:ditavalPath
uhe1592872955107.ditaval
dita:id
B035-1141
lifecycle
previous
Product Category
Teradata Vantageā„¢
Referential integrity (RI) is defined as all the following notions.
  • The concept of relationships between tables, based on the definition of a primary key (or UNIQUE alternate key) and a foreign key.
  • A mechanism that provides for specification of columns within a referencing table that are foreign keys for columns in some other referenced table.

    Referenced columns must be defined as Primary key columns or Unique columns.

  • A reliable mechanism for preventing accidental database corruption when performing inserts, updates, and deletes.

Referential integrity requires that a row having a value that is not null for a referencing column cannot exist in a table if an equal value does not exist in a referenced column.