当前位置: 首页 > 工具软件 > Integrity > 使用案例 >

Referential Integrity

纪秋月
2023-12-01

                                  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

 类似资料:

相关阅读

相关文章

相关问答