15.00 - Referential Integrity Constraint Checks - Teradata Database

Teradata Database Design

prodname
Teradata Database
vrm_release
15.00
category
User Guide
featnum
B035-1094-015K

Referential Integrity Constraint Checks

Teradata Database performs referential integrity constraint checks whenever any of the following things occur:

  • A referential integrity constraint is added to a populated table.
  • A row is inserted or deleted.
  • A parent or foreign key is modified.
  • The following table summarizes these actions:

     

    Action Taken

    Constraint Check Performed

    INSERT into parent table

    None.

    INSERT into child table

    Must have matching parent key value if the foreign key is not null.

    DELETE from parent table

    Abort the request if the deleted parent key is referenced by any foreign key.

    DELETE from child table

    None.

    UPDATE parent table

    Abort the request if the parent key is referenced by any foreign key.

    UPDATE child table

    New value must match the parent key when the foreign key is updated.