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

Home -> Community -> Usenet -> c.d.o.server -> Re: Help on integrity constraint issue

Re: Help on integrity constraint issue

From: Mike Liu <mike2322_at_hotmail.com>
Date: 30 Jan 2002 08:53:05 -0800
Message-ID: <2262aa8e.0201300853.552ce36f@posting.google.com>


morris_luk_at_my-deja.com (Morris Luk) wrote in message news:<e3ccc19b.0201291420.13bf43b8_at_posting.google.com>...
> Hi Mike:
>
> Thanks for your idea. But your delete and insert example is based on
> the assumption that the row in test1_dept table has been seen in both
> session 1 and 2 already. In that case, I agree that it should be
> handled differently. But my test example is different. The row in
> test1_dept table can only be seen in session 1 alone, not in sesion 2
> because session 1 has not committed yet. So that's why I think
> returning an error is more intuitive rather than creating deadlock.
> Have I made myself clear?
>

Yes, I understand your points and I agree with you that returning an error is more intuitive. Actually it would be more consistent with the "multi-version" concept Oracle has been promoting because in this case writer IS blocking reader. So I guess the question goes back to the old question, "Is multi-version better or locking better?". I don't know if there is a correct answer to this. In this case, I think the locking is more efficient.

Regards,
Mike Received on Wed Jan 30 2002 - 10:53:05 CST

Original text of this message

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