Re: Integrity constraint

From: <>
Date: 04 Feb 2009 18:55:54 GMT
Message-ID: <20090204140012.881$>

vm22 <> wrote:
> Sorry Jon - ignore my last post.
> It does seem like we are inserting while the delete is running. I am
> really surprised that Oracle does not ignore the new records that are
> added but thanks for the great explanation nevertheless.

How could Oracle ignore them without violating either ACID or the integrity constraint? Something's gotta give.

> What is the solution to this - I looked at the asktom but could not
> find anything.

I think the solution depends on why you are doing this delete in the first place. These aren't old unused records, because if they were you wouldn't be colliding with other processes trying to insert children to them--they are obviously being actively used. What would happen if your delete succeeded and committed and than one of your inserting processes tries to do an insert of an orphan in to Y or Z? Would it (and should it) fail back to the user, or would it catch the error and try to recreate the just-deleted entry from X in order to be the parent? And if the entries of X are so easily recreated on the fly, is there an actual need for an X table in the first place?


-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
Received on Wed Feb 04 2009 - 12:55:54 CST

Original text of this message