How to prevent orphaned polymorphic records? – Mysql
I have a database of polymorphic structure: a "base" type table and two "derived" types: CREATE TABLE ContactMethod( id integer PRIMARY KEY person_id integer priority integer allow_solicitation boolean FOREIGN KEY(person_id) REFERENCES People(id) ) CREATE TABLE PhoneNumbers( contact_method_id integer PRIMARY KEY…