Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary key
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00766466
Message ID:
00768983
Views:
19
John,
from normalization point of view you should create a table that holds the primary keys of both related tables and its own pk.
For such a table I create three indices:
- the pk of the table (+ index)
- the fk (foreign key) of the first table (+ index)
- the fk of the second table (+ index)
I don´t see the need to create a concatenated index. Why do you want to create such an index? If you are going the query the table it will be on either one of the fk´s. Having an index for each of them is enough. There is no need to join them in a string.
The combinations of the fk´s do not need to be unique, the relation is n:m.

Hope this helps.

Regards,

Ron

>Hi,
>Thank you for your info.
>My further question is,
>if I have a many-to-many relationship table, how should I build up the candicate index to ensure the uniqueness which contain 2 integer value?? Should I just add 2 integer or STR() them and join it as string?
>
>Thank you
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform