Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Non data bearing primary keys
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00106667
Message ID:
00106958
Views:
29
>More observations on primary keys:

>1. PK's that are typed as integer are very fast -- Mac Rubel did some experimentation along this line and recently published his findings in a series of articles in FoxPro Advisor.

Very correct. That was one BIG point I missed to mention.

>2. "Non-data" PK values are not likely to change and are therefore better for establishing and maintaining persistent relationships. For example: If you have a FAMILY table and a MEMBER table, and members are linked to a family by Last Name, what happens if one of the members' name changes? OTOH, if the link is done using a "non-data" PK, the link remains intact, regardless of changes to any of the data.

That was the main point I was trying to make.

>3. If you ever plan to upsize your VFP database to SQL Server, your job will be much easier if each of your VFP tables has a PK. I think (correct me if I'm wrong) that SQL server requires each table to have a PK.

SQL server only requires a PK if you want to update the data.
Chad Gronbach
Blackstone, Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform