Referential Integrity
1. A PARENR KEY value must be UNIQUE, and can’t be NULL.
2. A FOREIGN KEY value must match a PARENT KEY or be NULL
3. DB2 enforcement of referential constraints:
l For FOREIGN KEY
--INSERT/UPDATE/LOAD
Must match PARENT KEY or be NULL
--Delete
No constraint
l For PARENT KEY
--INSERT
No constraint
--Delete
When delete a parent key, what should be done to matching foreign keys?
* CASCADE
* SET NULL
* RESTRICT/NO ACTION
--UPDATE/LOAD
When there is a foreign key matchs the updating parent key
* RESTRICT
When there is a foreign key matchs the updated parent key
* NO ACTION