Referential Integrity (RI)
An RI relationship is one in which the dependent table rows contain a foreign key, the value of which is the primary key of the parent table. Referential Integrity shows an RI relationship. The value of every WORKDEPT in the EMP table must appear as a DEPTNO in the DEPT table. The value of every RESPEMP in the PROJ table must appear as a EMPNO in the EMP table. The rules that define RI relationships are enforced by Db2. The following definitions help to explain it in more detail:
- Primary Key: The column or set of columns that provide the unique identifiers of the rows.
- Foreign Key: A column or set of columns that refer to a primary key. Establishing a foreign key defines a relationship between two tables.
- Referential Constraint: The rule that a value of a foreign key must appear as a value of the primary key of some specific table.
- Parent Table: The table referenced in a referential constraint that contains the primary key.
- Dependent Table: The table referenced in a referential constraint that containing the foreign key.
- Descendant Table: A dependent of a dependent table.
- Referential Integrity: The enforcement of all referential constraints.
Referential Integrity
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*