16.20 - Terminology - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantageâ„¢ SQL Fundamentals

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-02
dita:mapPath
zce1519094756513.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
Term Definition
Child Table A table where the referential constraints are defined.

Child table and referencing table are synonyms.

Parent Table The table referenced by a child table.

Parent table and referenced table are synonyms.

Primary Key

UNIQUE Alternate Key

A unique identifier for a row of a table.
Foreign Key A column set in the child table that is also the primary key (or a UNIQUE alternate key) in the parent table.

Foreign keys can consist of as many as 64 different columns.

Referential Constraint A constraint defined on a column set or a table to ensure referential integrity.

For example, consider the following table definition:

CREATE TABLE A
(A1 CHAR(10) REFERENCES B (B1), /* 1 */
 A2 INTEGER
FOREIGN KEY (A1,A2) REFERENCES C /* 2 */
PRIMARY INDEX (A1));
This CREATE TABLE statement specifies the following referential integrity constraints.
  • Constraint 1 is defined at the column level. Implicit foreign key A1 references the parent key B1 in table B.
  • Constraint 2 is defined at the table level.

    Explicit composite foreign key (A1, A2) implicitly references the UPI (or a USI) of parent table C, which must be two columns, the first typed CHAR(10) and the second typed INTEGER.

    Both parent table columns must also be defined as NOT NULL.