Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Riddle me why?
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Titre:
Divers
Thread ID:
00468088
Message ID:
00468103
Vues:
17
>Why would you use a generated primary key and a generated candidate key? If both keys have to be uniquely inforced and both are system generated why would you use two???

Department of Motor Vehicles generates the next available driver's license number [that may be alpha-numeric] which should be unique. This would be my candidate key. I would also generate a surrogate PK that is integer. Same thing with Social Security office. Banking and other account numbers should also be unique, but do they make good PKs? Phone numbers can be candidates, but I would not use them as a PK. Otherwise, I can think of very few reasons to do this.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform