Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: delete cascade

Re: delete cascade

From: David BL <davidbl_at_iinet.net.au>
Date: 17 Apr 2007 19:08:17 -0700
Message-ID: <1176862097.879006.92420@b75g2000hsg.googlegroups.com>


On Apr 18, 9:31 am, paul c <toledobythe..._at_oohay.ac> wrote:
> Bob Badour wrote:
> > ...
> > I am still lost. When does it delete? When does it not delete?
>
> Oh, I was assuming a delete is not possible if it would cause the
> constraint to be violated. Just what would happen would depend on
> implementation, personally I'd prefer a result of "false" but I guess
> many people prefer exceptions, just as many prefer "delete cascade".
>
> p

That's not consistent with your OP where you say

    ...Ie., why shouldn't delete always mean so-called "cascade"?

It seems to me there is only one logical constraint

        item exists => inv exists

This must be met on any snapshot of the DB.

For this one logical constraint there are two possible "procedural" constraints when deleting an invoice:

delete cascade : delete invoice -> delete items

no delete cascade : item exists -> don't delete invoice

You can express the logical constraint in any way you like, but in the end they are all equivalent. I don't see how it has any bearing on a procedural constraint. Received on Tue Apr 17 2007 - 21:08:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US