db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Van Couvering" <da...@vancouvering.com>
Subject Re: Deferrable constraints
Date Thu, 14 Jun 2007 16:01:26 GMT
Since Derby doesn't support it, I can't think of an automated way to
do this.  But you could probably emulate this by removing the foreign
key constraint entirely and then using insert/update triggers to
enforce consistency.  I'm pretty sure that's how we did it in the old
days at Sybase before the days of foreign key constraints.

David

On 6/14/07, Williamson, Nick <nick_williamson@mentor.com> wrote:
>
>
> Hi all,
>
> I'm migrating an Oracle schema to the Derby environment. In Oracle, all my
> FK constraints are defined as INITIALLY DEFERRED DEFERRABLE, which means
> that the validation checking isn't performed until commit time. If I have
> parent table "A" and child table "B", I can create a row in table B first,
> then create a row in table A (in the same transaction) and the commit will
> be successful. Derby doesn't support INITIALLY DEFERRED DEFERRABLE and the
> validation seems to be performed immediately by default. Is there a way to
> over-ride this behaviour and emulate what I had in my Oracle environment?
>
> TIA
> Nick

Mime
View raw message