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 -> How to bypass referential integrity

How to bypass referential integrity

From: Van Messner <vmessner_at_bestweb.net>
Date: Tue, 05 Jun 2001 22:23:58 GMT
Message-ID: <2_cT6.525$7d.60964@newshog.newsread.com>

Here's the setup.
Table A has an primary key AKEY
Table B has a primary key BKEY
Table INT is an intersection between A and B. INT has a column called AKEY which is foreign keyed back to the same column in A. INT has a column called BKEY which is foreign keyed back to the same column in B. In table INT the primary key is the columns AKEY and BKEY. There are regular b-tree indexes on AKEY and on BKEY in INT. A standard setup.

If you put data into A, B and INT, then deleting data from A or B when child rows exist in INT causes an Oracle error.

BUT now compress the index on AKEY in INT and compress the index on BKEY in INT. You can then delete rows in either A or B or both where child rows exist in INT, leaving orphan rows behind in INT and Oracle gives no error message.

Van Received on Tue Jun 05 2001 - 17:23:58 CDT

Original text of this message

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