Database-Architecture Foreign Keys Are Not Optional Why enforcing relationships in the application layer sounds good in theory — and what happens in production when you do.