Tree constraint in the adjacency graph model
Date: 24 Jun 2005 16:20:33 -0700
Message-ID: <1119655233.459620.204870_at_g44g2000cwa.googlegroups.com>
Stefan Rybacki wrote:
> >> Consider adding these constraints: QuoteNo as key,
> >> and PreviousQuoteNo as foreign key to QuoteNo.
> >>
> >> Only now we have the intended tree-consistency.
> >> The circular states mentioned above are inconsistent with the
> >> constraints, and I can't add these values by hand or by algorithm.
> >
> >
> > Oops - still not good enough.
>
>
> It should be good enough for an insert but not for an update, or did I
> forget something?
With QuoteNo as unique key no child having 2 parents is allowed, so that the only structures that escape this constrait are cycles. Then, disallow cycles requiring that at least one node should either have 2 children or no children at all. Received on Sat Jun 25 2005 - 01:20:33 CEST