Subject | Re: [firebird-support] Unique constraint vs unique index, why do they have to be different? |
---|---|
Author | David Garamond |
Post date | 2003-12-14T03:31:38Z |
Helen Borrie wrote:
achieve uniqueness of column"? True, FB still requires unique constraint
declaration (not unique index), and that's what I am questioning. If a
column is being uniquely indexed, why doesn't the column automatically
become eligible for being referenced by an FK?
index on a column and a unique key (not PK)?
dave
>>Aren't UC alwaysSorry, what I meant was "by using a unique index, don't we effectively
>>"implemented" using UI?
>
> Yes.
>
>>(And by using UI, don't we effectively achieve UC?)
>
> No. A unique index isn't a unique constraint - it can't be referenced by a
> foreign key.
achieve uniqueness of column"? True, FB still requires unique constraint
declaration (not unique index), and that's what I am questioning. If a
column is being uniquely indexed, why doesn't the column automatically
become eligible for being referenced by an FK?
> It's there toOkay, but what is the [effective, visible] difference between a unique
> -- cater for people like yourself who want to reference columns other than
> the PK in FK relationships. Dependencies are created on keys, not indexes.
index on a column and a unique key (not PK)?
> -- comply with the standard which allows for people to do dependencies--
> that, while contraindicated on the grounds of atomicity, conform with
> relational theory.
dave