Subject Re: [ib-support] Unique constraint not an index? was Re: Error:Object is in use
Author Ann W. Harrison
At 01:38 PM 2/24/2001 +1100, Helen Borrie wrote:
>At 07:03 PM 23-02-01 -0500, the Mother of InterBase wrote:
> >
> > The UNIQUE constraint does create an index called RDB$UNIQUE<n>
> >unless the constraint is named. An named constraint creates an index
> >with a name that reflects the constraint name. Those are normal
> >(and desirable) indexes as far as the optimizer is concerned. That's
> >been the behavior since forever - from our first SQL implementation.
>To kind of answer the original question (and mine, now) - why should I
>bother to create a unique constraint if it's all-same-different if I make
>a unique index instead? Is this "optionality" there to service some sort
>of backward compatibility?

Or why should you create a unique index if a unique constraint has the
same effect? SQL data definition semantics tend toward redundancy,
'garters & panty hose' if you like.


We have answers.