Expected FK delete facts are assertions only.

highlighted = computed this step

Honest by construction

Expected foreign-key delete facts are assertions only.

compiler is source of truth\text{compiler is source of truth}

Render checked facts

The guarded cascade is deleted and affects 2 child rows.

affected=2\text{affected}=2

Foreign-key delete-action examples are tiny finite table checks; SET NULL, deferrable checks, triggers, transactions, locks, timing, indexing, performance, general referential-action completeness, and product behavior are out of scope.

Honest by construction: parent rowscustomer_idname1Ada2Ben3Cy4Dee Honest by construction: child rowsorder_idcustomer_idtotal101150102230103170104NULL5 Child-to-parent referenceschildRowchildValueparentRowstatus010matches_parent121matches_parent210matches_parent3NULLnoneNULL_no_reference Delete resultfieldvalueactioncascadeparentValue1parentRow0statusdeletedchildRowsAffected(0, 2) Parent after deletecustomer_idname2Ben3Cy4Dee Child after deleteorder_idcustomer_idtotal102230104NULL5 FK delete factsfactvalueparentRowCount4childRowCount4referenceCount4nullChildKeyCount1affectedChildCount2deleteStatusdeletedparentAfterCount3childAfterCount2supportedActionsrestrict,cascade

Try to tamper

Wrong expected facts, derived sidecars, missing keys, unsupported delete actions, duplicate parent keys, bools, and floats fail closed.

tamper rejected\text{tamper rejected}

Summary

This book shows exact finite RESTRICT and CASCADE delete actions only.

scoped delete actions\text{scoped delete actions}