> If you want to enforce a 1 to N relationship, You can use a CONSTRAINT
> TRIGGER on the List table to ensure that there is at least one list
> item - if there isn't then raise an exception 'No List Items!!!'.
> You'd want to define the constraint as INITIALLY DEFERRED.
> http://www.postgresql.org/docs/9.2/interactive/sql-createtrigger.html
> http://www.postgresql.org/docs/9.2/interactive/sql-set-constraints.html
>
> A constraint trigger is the closest feature to an ASSERTION statement
> defined by the SQL standard.
Thanks, but the main issue for me is the precise definition of the
constraint to apply.
This issue should be as old as relational databases per se. I just can't
imagine no one has implemented a well-proven "standard" solution yet.
Sincerely,
Wolfgang