Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Riddle me why?
Message
General information
Forum:
Microsoft SQL Server
Category:
Database design
Title:
Miscellaneous
Thread ID:
00468088
Message ID:
00468103
Views:
19
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform