Constraints are rules that ensure that references from one table, a dependent table, to data in another table, the parent table, are valid. You use referential constraints to ensure referential integrity.
Use the SQL CREATE TABLE and ALTER TABLE statements to add or change referential constraints.
With a referential constraint, non-null values of the foreign key are valid only if they also appear as values of a parent key. When you define a referential constraint, you specify:
Optionally, you can specify a name for the constraint. If a name is not specified, one is automatically generated.
After a referential constraint is defined, the system enforces the constraint on every INSERT, DELETE, and UPDATE operation performed through SQL or any other interface including iSeries™ Navigator, CL commands, utilities, or high-level language statements.