Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What should the primary key be?
Message
From
03/02/1999 11:11:22
 
 
To
02/02/1999 21:37:41
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00182646
Message ID:
00183475
Views:
24
I totally respect your POV on integer primary keys, and I am moving toward it. But I do have a fondness for character keys, and am somewhat reluctant to let them go.

I like them because they can make use of information (i.e. base them on system, user, date, etc). Since they are surrogate keys you in effect have a permanent marker about when and who created the created the record. If one does any auditing at all, then you have this information being stored anyway.

As for the speed and size issue. Yes, but, by far, a character primary key is not going to be the biggest or slowest object in a VFP system. I see more performance gains optimizing page creation, using parameterized views, and so on.

>How much space does it take to store your GUID? Integers are small and VERY fast. Faster than character.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform