Referential integrity enforcement
The input/output (I/O) access for a database file that is associated with an established and enabled constraint varies, depending on whether the file contains the parent key or foreign key in the constraint relationship. The system enforces referential integrity on all parent and dependent file I/O requests.
The database enforces constraint rules for all I/O requests whether from application programs or system commands (such as the Initialize Physical File Member (INZPFM) command) or SQL statements or file I/O utilities (such as STRSEU).
- Foreign key enforcement
The rules that you specify for a referential constraint apply to parent key changes. The database enforces a no-action rule on the insert and update operations on the foreign key to ensure that the value of every non-null foreign key matches the value of the parent key.
- Parent key enforcement
The rules that you specify for a referential constraint determine how the database processes the delete and update operations on the parent key. The system enforces the unique attribute of a parent key on all parent file I/O.
Parent topic:
Ensuring data integrity with referential constraints