Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use generated primary keys ?
Message
De
10/05/2000 02:48:30
Walter Meester
HoogkarspelPays-Bas
 
 
À
09/05/2000 13:41:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00367063
Message ID:
00367991
Vues:
43
John,

>Jeez, this sure has generated a lot of messages.....

>My take: I'm with the surrogate key crowd. I don't reuse crap. I either use some variation on SYS(0)+SYS(2015) or a GUID and fuggedaboudit.

In most cases generated keys are a good solution, however this thread was meant to let people think about this subject and I tried to let people see filtered PK are an acceptable solution too. In the light of the ever recurring question about the uniqueness violation of PKs the most common answer was to drop intelligent keys. Well that's nice if you planning to build a system, but if somehow the system is already there and rewriting is not an option, Filtered Primary indexes certainly are a suitable alternative.

>Even SQL Server is going this way, hence the uniqueidentifier (which is a GUID) in addition to the identity (integer).

yes, they provide means of using generated keys, but they do not force the use of it. You still can use intelligent keys.

Walter,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform