4 ms·
Agreed. After all, if you wanted to keep all "business logic" out of the db you wouldn't even use foreign key constraints.
by atroche 7y ago
Agreed. After all, if you wanted to keep all "business logic" out of the db you wouldn't even use foreign key constraints.
- jeltz 7y agoOr arguably data types.
- arethuza 7y agoYou probably wouldn't use multiple tables or multiple columns either and just have a single table that stores document-like rows... which vaguely reminds me of something.
- dtech 7y agoPostgreSQL is a pretty good document store, and when you need it you have the relational model available and integrated.
- Dirlewanger 7y agoForeign key constraints are not business logic, they're part of a sound and sane database architecture (just like basic indices on heavily-queried columns). For an overwhelming majority of use cases, tables should have them; one needs a very good reason why a table shouldn't have them.