PostgreSQL: choosing ON DELETE RESTRICT, CASCADE or SET NULL without losing related records
Selecting the right ON DELETE action is a data-retention decision, not a syntax choice. RESTRICT protects dependents, CASCADE removes lifecycle children, and SET NULL preserves rows with optional references.
postgresql / foreign-key / on-delete / data-retention / cascade / restrict / set-null / referential-integrity