Walter Meester
HoogkarspelPays-Bas
Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement