Re: referential integrity constraints in db2 os/390 v6.1
January 10, 2002 05:24 PM
(in response to Maximiliano Alvarez)
I don't see a problem with what you are suggesting, foreign keys
can reference a table without a primary key in DB2 V6 as long as a
index exists on those columns.
However, I have been told that DB2 V7 adds a new wrinkle to this,
keys must now reference a parent key or unique key". This does not
just having a unique index, but having a unique constraint on the
And, since tables cannot be altered to add unique key constraints
it might be interesting. Not a problem, but if you go this way,
should be aware of it.
However, if I had a choice, I would rather see the foreign keys
I hope this helps.
Oscar M." To: [login to unmask email]
ADB.ORG> Subject: referential integrity constraints in
Sent by: DB2 db2 os/390 v6.1
<[login to unmask email]
to DB2 Data
At least in theory, in db2 os/390 v6.1 foreign keys can reference
unique key on a parent table. However, it is not clear whether it
possible to have two foreign keys: one of them referencing to the
key on the parent table and the other one referencing to a unique
same parent table.
has anyone tried this successfully?