Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What should the primary key be?
Message
De
03/02/1999 11:11:22
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
À
02/02/1999 21:37:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00182646
Message ID:
00183475
Vues:
23
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform