Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The point of cascading foreign keys is referential integrity.

Not quite. Databases can enforce referential integrity through foreign keys, without cascading deletes being enabled.

“On delete restrict” vs “on delete cascade” still enforces referential integrity, and is typically a better way to avoid the OP’s issue.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: