Re: delete cascade
From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Tue, 17 Apr 2007 12:32:43 GMT
Message-ID: <L73Vh.25360$PV3.256653_at_ursa-nb00s0.nbnet.nb.ca>
>
> ...
>
>
>
> Sorry, I think I put that wrongly. Maybe the constraint that "one may
> not delete an invoice when any items exists would look something like
> "(NOT Invoices{Invoice#}) AND Items{Invoice#} = FALSE", ie., a reference
> from the complement of invoices to items.
Date: Tue, 17 Apr 2007 12:32:43 GMT
Message-ID: <L73Vh.25360$PV3.256653_at_ursa-nb00s0.nbnet.nb.ca>
paul c wrote:
>> Bob Badour wrote:
>
> ...
>
>>> No. One states that deleting the invoice automatically deletes any >>> items that exist. The other states that one may not delete an invoice >>> when any items exist. >> >> >> >> Thanks, that clears up my confusion. Still, it strikes me as more an >> attitude than a logical interpretation. If I could, I'd rather wonder >> how to declare a reference from the logical complement of invoices to >> the complement of items!
>
>
> Sorry, I think I put that wrongly. Maybe the constraint that "one may
> not delete an invoice when any items exists would look something like
> "(NOT Invoices{Invoice#}) AND Items{Invoice#} = FALSE", ie., a reference
> from the complement of invoices to items.
I am not sure I fully understand your syntax and the order of precedence
you are using, but wouldn't demorgan make that:
Invoices{Invoice#} OR Items{Invoice#}
That doesn't seem like the constraint at all to me.