> The most straightforward way I know to enforce this is to check
> that at least one child exists in a DEFERRED trigger on the the
> parent. You still need to worry about concurrency issues.
Imho it's absurd that I have to do this ("worry about concurrency
issues") myself, how long - more than fourty years after the invention
of relational databases?
As a non-computer scientist by education?
> One way to do that is to use only SERIALIZABLE transactions. There
> are other ways, though they take more to describe and to implement.
What still astounds me is that, again, this (correct implementation of
1..n relationships with n>0) is an absolutely standard issue that is as
old as relational databases per se and NO ONE has implemented (and
documented and tested and...) a standard solution yet?
Gosh.
What were all those people doing all those decades.
Sincerely,
Wolfgang