Re: Do I need a PK on a join table?
From: Knut Stolze <stolze_at_de.ibm.com>
Date: Fri, 17 Feb 2006 08:18:04 +0100
Message-ID: <dt3tbc$tnn$1_at_lc03.rz.uni-jena.de>
Date: Fri, 17 Feb 2006 08:18:04 +0100
Message-ID: <dt3tbc$tnn$1_at_lc03.rz.uni-jena.de>
David Portas wrote:
> Knut Stolze wrote:
>>
>> Well, you have to use _some_ mechanism on the internal layer to support
>> the logical constructs on the conceptual layer.
>
> Not always. Sometimes you don't want or need an index for every unique
> constraint. For example:
>
> If the key is a superkey with a candidate key already defined
> If check constraints prevent duplicates
You're right. I forgot about those as not many products actually support arbitrary check constraints.
> If constraints on views prevent duplicates
>
> You may still need the constraint to support a foreign key. You don't
> need the index.
You can use informational unique constraints for that.
-- Knut Stolze DB2 Information Integration Development IBM GermanyReceived on Fri Feb 17 2006 - 08:18:04 CET