Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GUID as PK
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Divers
Thread ID:
01075523
Message ID:
01075541
Vues:
17
>Who uses GUIDs for PK? Why?

Unless you want a PK that is unique across space and time, then GUID is not really necessary. Also, this takes a *lot* of space and a higher indexing overhead.

>Who prefer bigint (or int) for their PK? Why?

This is solely down to your knowledge of the application and whether you think the range of numbers offered by an Int will always be sufficient for your PK needs. Generally, I think most "normal" systems (if there is such a thing) would find Int to be perfectly acceptable for PKs. If you wanted to be doubly sure, go ahead and use Bigint as it will do no harm but, if you don't really need the number range offered by Bigint, then you are just using/wasting space in the database.
-=Gary
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform