| 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: >> >>>SQL and DB2 confound the issue by mixing physical structures (indexes) >>>with purely logical integrity constraints (uniqueness/keys), by allowing >>>the abominable NULL, >> >> I don't know where there is anything "mixed" and how NULL would fit into >> this statement. Could you possibly explain how you mean that?
Agreed, that's just basic knowledge.
> 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. And that comes with logical/conceptual semantics. I think it would be nice if a unique index could not be created explicitly. But that's never going to change from how it is today.
> 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?
>>>If you have a strong argument for wanting no index, declare a uniqueness >>>constraint. >> >> Which will be enforced by a unique index...
Sure. But how "strong" could such an argument possibly be? I have not yet
seen it in the real world.
Triggers would be a way to avoid the index. But then you can't use the
concept of unique constraints.
-- Knut Stolze DB2 Information Integration Development IBM GermanyReceived on Wed Feb 15 2006 - 08:41:42 CST
![]() |
![]() |