Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What would be a better Primary Key?
Message
 
À
12/01/2006 23:07:34
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01086425
Message ID:
01086513
Vues:
18
Paul,
The situation you are describing screams uniqueidentifier to me. I started researching the uniqueidentifier filed type for my own project about 4 months ago and I was sold on the idea.

Sure uniqueidentifier takes up 8 bytes more than bigint and 12 bytes more than int (per record) and it is said to be slower (mostly in my opinion due to the fact that you have to send slightly more data over the wire).

How many records do you think there will be in the table(s)?

Is it important to know which branch the data came from?

Einar

>I am working on an app that will be used in multiple branch offices and then the data from all branches will be "consolidated" into a corporate database. Because of this I need to have a Primary key that will be unique among all branch offices.
>
>I can think of 2 choices the first being the uniqiueidentifier data type, or using a charater type with the primary key being BranchID0000001 etc.
>
>Any pro's or cons thoughts ideas would be welcome
Semper ubi sub ubi.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform