Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create composite index on Integer fields?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00063211
Message ID:
00063363
Views:
39
>If iKey1 is, say, a 5 digit field, you could have an index expression 100,000*iKey1 + iKey2. A tag like this could come in handy for ordering things if you are using the table itself, and not a view. But as many people here have told me, avoid compound primary keys and meaningful primary keys. At the very least, if you use compound keys, you will have to write your own RI code, because the RI code generated by vfp won't handle them. It is better to generate a surrogate key.

I didn't see that it was for use as a candidate key. I totally agree with you that you should not use a composite key as primary or candidate key.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform