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

Home -> Community -> Usenet -> c.d.o.misc -> Deferrable FK

Deferrable FK

From: Mike Burden <bmike_at_eidosnet.co.uk>
Date: Mon, 26 Aug 2002 09:52:09 +0100
Message-ID: <3d69ea7a$0$27145$afc38c87@news.eidosnet.co.uk>


We have an application that seems just right for deferred FK constraints. It's
a utility which moves data from one database to another using business rules.
This app is not too bright so it has trouble when moving data from tables with FK constraints because it hits the
tables in no particular order. However because the source and target database use the same design and all tables take part I know that all FK constraints will be ok
once all the data from a given key range has been moved i.e. at the commit point.

Now deferrable constraints solves the problem nicely. Small amounts of testing has confirmed this to be the case so my next step would be to convert all FK constraints to deferrable.

But this raises the questions.

Is 'not deferrable' and 'deferrable initially immediate' the same in performance terms?
If so why do we have 'not deferrable'?
How does Oracle actually do deferred checking as this, at first sight, seems quite complex?
Schema Manager seems to indicate (by the fact it won't let me do it) that FKs can't
just be change to deferrable so it seems they must be dropped and recreated which makes the whole exersise more complicated.What's all that about? Received on Mon Aug 26 2002 - 03:52:09 CDT

Original text of this message

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