Subject | Re: [firebird-support] Unique constraint vs unique index, why do they have to be different? |
---|---|
Author | Helen Borrie |
Post date | 2003-12-13T21:37:14Z |
At 11:52 PM 13/12/2003 +0700, you wrote:
foreign key.
-- cater for people like yourself who want to reference columns other than
the PK in FK relationships. Dependencies are created on keys, not indexes.
-- comply with the standard which allows for people to do dependencies
that, while contraindicated on the grounds of atomicity, conform with
relational theory.
/heLen
>I know they are "conceptually" different, but apart from the first oneYes.
>being able to be used in FK relation and the other cannot, what are the
>other practical differences between the two?
>Aren't UC always
>"implemented" using UI?
>(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.
>Why can't/won't the Firebird engine behave like this: if a UI is added,It's there to
>UC is also automatically be declared, and vice versa. Why do we still
>need to separate both? Historical reason?
-- cater for people like yourself who want to reference columns other than
the PK in FK relationships. Dependencies are created on keys, not indexes.
-- comply with the standard which allows for people to do dependencies
that, while contraindicated on the grounds of atomicity, conform with
relational theory.
/heLen