Re: circular relationships ok?

From: Marshall Spight <>
Date: 2 Mar 2006 09:37:21 -0800
Message-ID: <>

At last, a concrete example of an actual problem!

-CELKO- wrote:
> Technically, you can declare cycles with a CREATE SCHEMA statement
> which brings all the schema objects into being all at once.
> But the practical results are generally bad. A simple A->B and B->A
> cycle can prevent you from inserting or deleting from both tables ("To
> get a job, you need experience; to get experience, you need a job").

I won't comment on the deletion difficulty you describe. As for the insertion difficulty, would it be possible to defer the foreign key checks until the commit?

> The other "gotcha" is A->B, A->C and B->C with cascaded actions. I
> change A, which fires actions in both B and C. The change in B fires
> an action in C. But the changes to C are different on the same rows
> (say SET NULL and SET DEFAULT); which one takes effect? I one early
> version of DB2, the answer was whoever was the last guy to touch C --
> unpredictable.


Marshall Received on Thu Mar 02 2006 - 18:37:21 CET

Original text of this message