Subject | Re: [firebird-support] Re: what kind of primary key? |
---|---|
Author | Helen Borrie |
Post date | 2004-02-11T13:50:15Z |
At 01:11 PM 11/02/2004 +0000, you wrote:
Fb couldn't give you unique index over two foreign keys, if you wanted it
for an intersection table?
control the uniqueness of the foreign key pairs using manual triggers, to
avoid having the primary key index interfering with the two foreign key
indexes? If so, I agree it's an issue you would want to test, from a
performance POV, and compare with the performance of the natural PK
compounded over the four columns.
Helen
>--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@t...>I don't get what you mean here: many:many? Could you explain why you think
>wrote:
> > Have you considered using a single-column GUID? Totally random and
>unique.
>
>Yes, I have. The problem is, that indices are limited concerning the
>length of values. In my db I have many tables which describe m:n
>relations and firebird doesn't allow me to add a unique index over
>two foreign keys, then.
Fb couldn't give you unique index over two foreign keys, if you wanted it
for an intersection table?
>So I think I will go back to the compound PK idea.Do you mean, create a separate surrogate PK for the intersection table and
>Or don't you mind if you can't create an unique index for such a
>case.
control the uniqueness of the foreign key pairs using manual triggers, to
avoid having the primary key index interfering with the two foreign key
indexes? If so, I agree it's an issue you would want to test, from a
performance POV, and compare with the performance of the natural PK
compounded over the four columns.
>Remember, compound primary keys are not possible, either.I don't remember. Why?
Helen