Db2-Referential Integrity

1.When inserting foreign key row it disallows when there is no corresponding Primary key.

  1. New primary key row can be inserted as long as it is unique
  2. When updating foreign key value, it checks if corresponding primary key is available

  3. If a primary key has dependent foreign key Db2 does not allow to update. we can make by setting foreign key to zeros or we can delete all foreign key values.

  4. Deleting a row of foreign key is permitted.

  5. When deleting primary key: The below are the constraints:

CASCADE: , RESTRICT, SET NULL, NO ACTION

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.