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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: primary/ foreign key constraints for oltp, overhead?...soluti

Re: primary/ foreign key constraints for oltp, overhead?...soluti

From: Jared Still <jkstill_at_cybcon.com>
Date: Sun, 10 Jun 2001 22:43:18 -0700
Message-ID: <F001.00323B40.20010610222521@fatcity.com>

On Sunday 10 June 2001 21:50, Amar Kumar Padhi wrote:
> - locks
> Oracle generates internal locks on dict tables to maintain the data
> integrity.
> e.g.: I deleted a record from detail table in one session. In another
> session I tried to delete a master record not related to the deleted detail
> record. The 2nd session hanged. There were row-exclusive locks present on
> the detail table and an exclusive lock present on an internal table (I
> couldn't access). The same is the case with update.
>
> Oracle locks both the master & detail table records when the master record
> is deleted and the foreign key is created with on delete cascade option.
>
> Bottomline, Oracle doesn't allow altering of master table primary key when
> active transactions exists on detail table. Oracle will allow update of
> columns other than the primary key.

You should probably test this scenario, as it works fine for me.

Delete the a child detail row.
Delete an unrelated parent row, with delete cascade on the child table.

Works fine.

Possibly are missing an index? Some of these rules have changed I know, but I'll let you look up the details.

Bottom line, it does work.

Jared

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jared Still
  INET: jkstill_at_cybcon.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon Jun 11 2001 - 00:43:18 CDT

Original text of this message

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