Re:New In Postgres 12: Generated Columns
by atroche on Wednesday October 02, 2019 @05:32AM
(#21134681)
Agreed. After all, if you wanted to keep all "business logic" out of the db you wouldn't even use foreign key constraints.
[ Parent
| on HN ]
Re:New In Postgres 12: Generated Columns
by arethuza on Wednesday October 02, 2019 @05:43AM
(#21134738)
You 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.
Re:New In Postgres 12: Generated Columns
by dtech on Wednesday October 02, 2019 @06:12AM
(#21134844)
PostgreSQL is a pretty good document store, and when you need it you have the relational model available and integrated.
Re:New In Postgres 12: Generated Columns
by Dirlewanger on Wednesday October 02, 2019 @08:47AM
(#21135770)
Foreign 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.