Re: complex referential integrity constraints - Mailing list pgsql-general

From Richard Broersma Jr
Subject Re: complex referential integrity constraints
Date
Msg-id 118382.45919.qm@web31803.mail.mud.yahoo.com
Whole thread Raw
In response to Re: complex referential integrity constraints  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-general
to attack eachother.
>
> Depending on what you're modelling, even this could be too simple -- for
> example, while a single wolf is unlikely to attack a lion, a pack of
> wolves have a lot more probability of doing so.
>
> Do you keep packs of wolves in your barn?  If so, watch your lions.

Well from the previous thread that discussed the use of the <animal> table and sub-set tables
<prey> and <preditor>, if a preditor can attach a prey item or preditor item, then a table
relation only needs to be created between <preditor> and <animal>.  This way only preditors can
attack, but they can attach any other animal preditor or prey.

Regards,
Richard Broersma Jr.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_autovacuum should allow NULL values
Next
From: "Jim C. Nasby"
Date:
Subject: Re: [HACKERS] pg_autovacuum should allow NULL values