db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Williamson, Nick" <nick_william...@mentor.com>
Subject Foreign key constraints
Date Tue, 09 Oct 2007 13:03:51 GMT
Hi all,

I see that in Derby, foreign key constraints don't support the deferred
/ deferrable syntax that I'm used to using in Oracle, and - creating
data in IJ by running a script - validation seems to take place straight
away by default (in other words, Derby doesn't wait until the COMMIT).
Now what if I have a transaction inserting into several tables and one
of the tables that I'm inserting into has an FK constraint pointing at
one of the others? It would seem to be the case that unless I issue all
the INSERTs in the "right" order, they will fail. Similarly, if I have a
circular dependency where two tables each have an FK constraint pointing
at the other one, I would imagine that I will never be able to insert
data into those tables. Is there a way of changing Derby's behaviour
with regard to the time when FK constraints are enforced?


View raw message