| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Do I need a PK on a join table?
Bob Badour wrote:
> Knut Stolze wrote:
>
>> Bob Badour wrote: >>>Knut Stolze wrote:
>>>In DB2, a primary key mixes two logical constraints (candidate key, >>>uniqueness) with a physical structure (index). >> >> No, not really. Granted, DB2 creates a unique index to support the >> primary key/unique constraint.
Well, you have to use _some_ mechanism on the internal layer to support the logical constructs on the conceptual layer. Still, I would consider both things as quite distinct.
>>>In DB2, uniqueness and candidate key are two logical constraints instead >>>of one due to the abominable NULL. >> >> With "uniqueness" your are referring to unique indexes not unique >> constraints, right?
Because you are mixing these two things all the time. A unique constraint is the same as a candidate key. So you can possibly only have referred to a unique index as those behave differently with respect to NULLs - which I don't like either as you have seen.
>>>>>If you have a strong argument for wanting no index, declare a >>>>>uniqueness constraint. >>>> >>>>Which will be enforced by a unique index... >>> >>>In that case, DB2 forces one to have an index when one has a strong >>>argument for not wanting it. That seems rather stupid to me. >> >> Sure. But how "strong" could such an argument possibly be?
It would help if you could actually provide an example. But I guess that's due to the "theory" part of the group.
-- Knut Stolze DB2 Information Integration Development IBM GermanyReceived on Thu Feb 16 2006 - 02:24:59 CST
![]() |
![]() |