Parent Required | Action on Parent | Action On Child |
---|---|---|
Insert | None | Get A Parent |
Prohibit | ||
Modify Key or FK | Change children's foreign keys values to match new value (cascade update) | OK, if new foreign key value matches existing parent |
Prohibit | Prohibit | |
Delete | Delete Children (Cascade delete) | None |
Prohibit |
Child Is Required | Action On Parent | Action On Child |
---|---|---|
Insert | Get Child | None |
Prohibit | ||
Modify Key or FK | Update the FK of (at least one) child | If not last child, OK |
Prohibit | If last child, prohibit or find a replacement | |
Delete | None | If not last child, OK |
If last child, prohibit or find a replacement |