- Report as spam Discussion - Post 20 of 69
- Two of the major factors in deciding on a natur...
- Two of the major factors in deciding on a natural or surrogate key is: (A) Can the value of the proposed natural key be modified in any way, at any time, by anyone or anything or any circumstance outside the complete control of the automated system you are developing? and, related to that, (B) Can it ever be the case that when you need to record the existence or possible existence of some entity, the value of its natural primary key is unknown?
If the answer to either (A) or (B) is Yes, then the proposed natural key is a poor choice for a physical key. For example, it's not unusual in the United States for a system to use the Social Security Number as the key for records about a person. (I hope it's less common than it used to be, but I'n sure there are still many such systems.) But SSNs are often unknown at the time a record ought to be created (depending on the purpose of your system you may not even know that the person exists - it may just be a suspicion, or an expectation); they can be misreported and need correction in your system; and, although it is rare, they are sometimes misassigned and later corrected by the government, necessitating their change in your system. So they are actually very poor natural keys.
Part Numbers defined within your system are a slightly more nuanced case, but there too, I would steer away from using them in the key. It may be the case today that you always assign them at the time of recording the part in the system, and never, ever, ever change them once assigned, but will that always be so? Think about the possibility of mergers or acquisitions, and what that may do to your numbering scheme. Or maybe, even though your design and manufacturing engineers are practically perfect in every way, just maybe, one of them makes a mistake one day and has to change it. If this natural key is the physical key, and the part number has been in use for a while and then has to be changed, you have a problem. even if it's "only" a performance problem. - Posted: 04/02/2004 @ 01:28 PM (PST)
-
![[image]](http://mowser.com/img?url=http%3A%2F%2Fi.t.com.com%2Fi%2Ftr%2Fsig_shadow.gif)
- JimGawn
- Job Role: IT Consultant
- Location: New Cumberland, Pennsylvania
- Member since: 03/01/2001
- View Profile | Send Message
Print/View all Posts | Subscribe to this Thread
Read original item: The great primary-key debate
Great debate?Lyndal | 03/22/2002 @ 03:01 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Greate Read, Nothing Beginner about ittandel | 03/23/2002 @ 01:09 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Greate Read, Nothing Beginner about ittandel | 03/23/2002 @ 01:14 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
sequential?bob@... | 03/25/2002 @ 12:09 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Natural primary keysjwallison | 03/26/2002 @ 07:58 PM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
I've had this argument many a time with seasone...travis@... | 03/27/2002 @ 12:23 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Access/Jet Can Make "Mistakes"mattohare@... | 04/03/2002 @ 02:12 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
use of surrogate keyerik.bronckaers@... | 10/10/2002 @ 08:32 PM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
You've been luckynyc_guru_sorta | 04/12/2002 @ 12:06 PM (PDT)
Surrogate PKs and Composite PKsbuilder@... | 03/26/2002 @ 12:47 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
This is where you'd relate the tablestravis@... | 03/27/2002 @ 12:20 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Line item table keysrick@... | 03/28/2002 @ 12:04 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Child Table PKsmattohare@... | 04/03/2002 @ 02:39 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
ProdID based on current business ruleswmillett@... | 04/08/2002 @ 01:44 AM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Bad Idea for Line ItemsM. Shawn Dillon | 07/03/2002 @ 12:20 PM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Opinion on builder's PK questionKeeBored | 10/09/2002 @ 11:12 PM (PDT)
Duplicate recordsrick@... | 03/27/2002 @ 06:17 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Duplicate Recordsbcbeatty | 03/28/2002 @ 11:32 PM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Unique Clauseaaron_myers | 10/09/2002 @ 11:00 PM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Two of the major factors in deciding on a natur...JimGawn | 04/02/2004 @ 01:28 PM (PST)
one problemThomasAnderson | 03/27/2002 @ 08:26 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Reading for comprehension...AdminSparky | 03/28/2002 @ 10:37 PM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Solutionharkins@... | 04/02/2002 @ 11:45 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2Fspacer.gif)
More Solutionmattohare@... | 04/03/2002 @ 02:49 AM (PST)
Surrogates are unnaturalhjweigel@... | 03/29/2002 @ 09:44 AM (PST)
My concernlnarendra@... | 04/01/2002 @ 03:56 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
It's not a surrogate primary key if the the use...adolf s | 04/02/2002 @ 11:14 PM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Primary key is not seenrsalcedo | 04/02/2002 @ 11:38 PM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2Fspacer.gif)
A word of caution re advocating that a surrogat...JimGawn | 04/02/2004 @ 01:59 PM (PST)
Social Security Numbers Not Uniquejeffdi@... | 04/03/2002 @ 11:36 PM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
SSN Faux Follymattohare@... | 04/05/2002 @ 07:35 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
1st Law of Security: Coincidences ain'tian_ison@... | 05/11/2003 @ 03:34 PM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
There's even moreK.I.S.S. | 06/26/2002 @ 07:15 AM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2Fspacer.gif)
Privacy and Data Protection Violationk_edwards | 07/23/2002 @ 08:49 PM (PDT)
The conclusion is just plain wrong!AgeTheGod | 04/04/2002 @ 06:24 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
I have to agree + (part 2)jharden@... | 04/30/2002 @ 03:18 AM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
I have to agree + (part 1)jharden@... | 04/30/2002 @ 03:20 AM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
I have to agree + (part 3)jharden@... | 04/30/2002 @ 03:21 AM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Body of evidence...Tore | 10/10/2002 @ 01:17 AM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
So give some examples...Tore | 10/10/2002 @ 01:13 AM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Re: The conclusion is just plain wrong!JimGawn | 04/02/2004 @ 02:09 PM (PST)
Non Primary TablesLee Quinn | 04/04/2002 @ 11:51 PM (PST)
Flat Wronghwwang_2000@... | 04/05/2002 @ 03:35 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Read it againmwp.reid@... | 04/21/2002 @ 12:16 AM (PDT)
No surrogate keyTheGreatWall | 04/10/2002 @ 11:22 AM (PDT)
Builder.com irresponsiblerjplummer | 04/16/2002 @ 02:59 AM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Rubbishmwp.reid@... | 04/21/2002 @ 12:14 AM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Rubbish..NOTbyrmol@... | 04/21/2002 @ 05:55 PM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Thats' one for the booksBunce | 06/16/2002 @ 07:38 PM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Study this ...jharden@... | 04/30/2002 @ 03:43 AM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Not set in stonepablopp@... | 12/18/2007 @ 10:39 PM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
And the soap box is outdated at thatK.I.S.S. | 06/26/2002 @ 08:06 AM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2Fspacer.gif)
User Interface and PKntcse@... | 04/28/2004 @ 08:02 PM (PDT)
Real world example: Natural key badJasonVeniot | 06/25/2002 @ 10:43 PM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
My rules for keysJoe Celko | 07/10/2002 @ 03:43 AM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2Fspacer.gif)
An Exceptiondburr@... | 03/21/2008 @ 11:01 AM (PDT)
First, there is already a similar article at omen | 06/27/2002 @ 07:09 AM (PDT)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
More things to consider...jgodse1@... | 07/28/2002 @ 01:30 AM (PDT)
Too dogmaticGilles1 | 07/23/2002 @ 06:47 AM (PDT)
Article is bang on.peter.kurth@... | 10/10/2002 @ 01:48 AM (PDT)
I've learned a great tipsugly@... | 11/06/2002 @ 08:54 PM (PST)
Who cares and why?cradford@... | 01/05/2003 @ 10:05 PM (PST)
Nothing But A Furphyjourneyman2001@... | 01/14/2003 @ 11:25 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Ack!!!journeyman2001@... | 01/14/2003 @ 11:57 AM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2Fspacer.gif)
While I'm here though...journeyman2001@... | 01/14/2003 @ 12:04 PM (PST)
Usefule advice marred by serious misconceptionsJimGawn | 04/02/2004 @ 06:35 PM (PST)![[image]](http://mowser.com/img?url=http%3A%2F%2Ftechrepublic.com.com%2Fi%2Ftr%2FtreeSkipItem.gif)
Database Design and Surrogate Keysfrances.brickhill@... | 07/13/2004 @ 01:13 PM (PDT)
RE: The great primary-key debatedburr@... | 03/21/2008 @ 11:03 AM (PDT)SponsoredWhite Papers, Webcasts, and Downloads
Streamline IT Operations and Drive Innovation Across Your Company SAP Voice over IP Reliability: Architecture Matters ShoreTel Opening the Door to VoIP--and More Effective Phone Communications ShoreTel

SponsoredWhite Papers, Webcasts, and Downloads
Opening the Door to VoIP--and More Effective Phone Communications ShoreTel Negotiating with Authority Global Knowledge Unified Communications Pocket Guide ShoreTel

Browse by tag
- networking
- hardware
- programming
- software
- windows
- linux
- it management
- career
- security
- off-topic
- feedback
- project management





![[image]](http://mowser.com/img?url=http%3A%2F%2Fi.i.com.com%2Fcnwk.1d%2FAds%2F2142%2F12%2FATThotspot1208%2Flg_att_125.gif)


