Ph: 2023428513
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]
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
[image]Great debate?Lyndal | 03/22/2002 @ 03:01 AM (PST)
[image][image]Greate Read, Nothing Beginner about ittandel | 03/23/2002 @ 01:09 AM (PST)
[image][image]Greate Read, Nothing Beginner about ittandel | 03/23/2002 @ 01:14 AM (PST)
[image][image]sequential?bob@... | 03/25/2002 @ 12:09 AM (PST)
[image][image]Natural primary keysjwallison | 03/26/2002 @ 07:58 PM (PST)
[image][image][image]Access/Jet Can Make "Mistakes"mattohare@... | 04/03/2002 @ 02:12 AM (PST)
[image][image][image]use of surrogate keyerik.bronckaers@... | 10/10/2002 @ 08:32 PM (PDT)
[image][image]You've been luckynyc_guru_sorta | 04/12/2002 @ 12:06 PM (PDT)
[image]Surrogate PKs and Composite PKsbuilder@... | 03/26/2002 @ 12:47 AM (PST)
[image][image]This is where you'd relate the tablestravis@... | 03/27/2002 @ 12:20 AM (PST)
[image][image]Line item table keysrick@... | 03/28/2002 @ 12:04 AM (PST)
[image][image][image]Child Table PKsmattohare@... | 04/03/2002 @ 02:39 AM (PST)
[image][image][image]Bad Idea for Line ItemsM. Shawn Dillon | 07/03/2002 @ 12:20 PM (PDT)
[image][image]Opinion on builder's PK questionKeeBored | 10/09/2002 @ 11:12 PM (PDT)
[image]Duplicate recordsrick@... | 03/27/2002 @ 06:17 AM (PST)
[image][image]Duplicate Recordsbcbeatty | 03/28/2002 @ 11:32 PM (PST)
[image][image]Unique Clauseaaron_myers | 10/09/2002 @ 11:00 PM (PDT)
[image][image]Two of the major factors in deciding on a natur...JimGawn | 04/02/2004 @ 01:28 PM (PST)
[image]one problemThomasAnderson | 03/27/2002 @ 08:26 AM (PST)
[image][image]Reading for comprehension...AdminSparky | 03/28/2002 @ 10:37 PM (PST)
[image][image]Solutionharkins@... | 04/02/2002 @ 11:45 AM (PST)
[image][image][image]More Solutionmattohare@... | 04/03/2002 @ 02:49 AM (PST)
[image]Surrogates are unnaturalhjweigel@... | 03/29/2002 @ 09:44 AM (PST)
[image]My concernlnarendra@... | 04/01/2002 @ 03:56 AM (PST)
[image][image]Primary key is not seenrsalcedo | 04/02/2002 @ 11:38 PM (PST)
[image]Social Security Numbers Not Uniquejeffdi@... | 04/03/2002 @ 11:36 PM (PST)
[image][image]SSN Faux Follymattohare@... | 04/05/2002 @ 07:35 AM (PST)
[image][image]There's even moreK.I.S.S. | 06/26/2002 @ 07:15 AM (PDT)
[image][image][image]Privacy and Data Protection Violationk_edwards | 07/23/2002 @ 08:49 PM (PDT)
[image]The conclusion is just plain wrong!AgeTheGod | 04/04/2002 @ 06:24 AM (PST)
[image][image]maybe...adolf s | 04/04/2002 @ 08:02 PM (PST)
[image][image]I have to agree + (part 2)jharden@... | 04/30/2002 @ 03:18 AM (PDT)
[image][image]I have to agree + (part 1)jharden@... | 04/30/2002 @ 03:20 AM (PDT)
[image][image]I have to agree + (part 3)jharden@... | 04/30/2002 @ 03:21 AM (PDT)
[image][image][image]Body of evidence...Tore | 10/10/2002 @ 01:17 AM (PDT)
[image][image]So give some examples...Tore | 10/10/2002 @ 01:13 AM (PDT)
[image][image]Re: The conclusion is just plain wrong!JimGawn | 04/02/2004 @ 02:09 PM (PST)
[image]Non Primary TablesLee Quinn | 04/04/2002 @ 11:51 PM (PST)
[image]Flat Wronghwwang_2000@... | 04/05/2002 @ 03:35 AM (PST)
[image][image]Read it againmwp.reid@... | 04/21/2002 @ 12:16 AM (PDT)
[image]No surrogate keyTheGreatWall | 04/10/2002 @ 11:22 AM (PDT)
[image]Builder.com irresponsiblerjplummer | 04/16/2002 @ 02:59 AM (PDT)
[image][image]Rubbishmwp.reid@... | 04/21/2002 @ 12:14 AM (PDT)
[image][image][image]Rubbish..NOTbyrmol@... | 04/21/2002 @ 05:55 PM (PDT)
[image][image][image][image]Thats' one for the booksBunce | 06/16/2002 @ 07:38 PM (PDT)
[image][image][image]Study this ...jharden@... | 04/30/2002 @ 03:43 AM (PDT)
[image][image][image]Not set in stonepablopp@... | 12/18/2007 @ 10:39 PM (PST)
[image][image]And the soap box is outdated at thatK.I.S.S. | 06/26/2002 @ 08:06 AM (PDT)
[image][image][image]User Interface and PKntcse@... | 04/28/2004 @ 08:02 PM (PDT)
[image]Real world example: Natural key badJasonVeniot | 06/25/2002 @ 10:43 PM (PDT)
[image][image]My rules for keysJoe Celko | 07/10/2002 @ 03:43 AM (PDT)
[image][image][image]An Exceptiondburr@... | 03/21/2008 @ 11:01 AM (PDT)
[image]First, there is already a similar article at omen | 06/27/2002 @ 07:09 AM (PDT)
[image][image]More things to consider...jgodse1@... | 07/28/2002 @ 01:30 AM (PDT)
[image]Too dogmaticGilles1 | 07/23/2002 @ 06:47 AM (PDT)
[image]Article is bang on.peter.kurth@... | 10/10/2002 @ 01:48 AM (PDT)
[image]I've learned a great tipsugly@... | 11/06/2002 @ 08:54 PM (PST)
[image]Who cares and why?cradford@... | 01/05/2003 @ 10:05 PM (PST)
[image]Nothing But A Furphyjourneyman2001@... | 01/14/2003 @ 11:25 AM (PST)
[image][image]Ack!!!journeyman2001@... | 01/14/2003 @ 11:57 AM (PST)
[image][image][image]While I'm here though...journeyman2001@... | 01/14/2003 @ 12:04 PM (PST)
[image]RE: The great primary-key debatedburr@... | 03/21/2008 @ 11:03 AM (PDT)
[ http://bwp.techrepublic.com.com/search?ordinal=2
TPG Power Checklist: Troubleshooting TCP/IP
TCP/IP, the protocol powering Internet, Intranet and Extranet communications, provides critical functionality withinmost every organization. Numerous ...
Buy Now
Cisco IOS Command Chart (IOS v.12+)
Becoming proficient with Cisco equipment means remembering a whole new set of commands. These command charts give you a quick way to look up the needed IOS commands and switches when you need them.
Buy Now
[ http://techrepublic.com.com/html/tr/tpg_iframe.html ]
A ZDNet brand Site Help & Feedback

Popular on CBS sites: MLB | Spore | iPhone 3G | Paris Hilton | Antivirus Software | GPS | Recipes | Shwayze | NFL

About CNET Networks | Jobs | Advertise | Mobile | Site Map

© 2008 CNET Networks, Inc., a CBS Company. All rights reserved. | Privacy Policy | Terms of Use

IP Networking

Anywhere, anytime productivity isn’t just for cyber-geeks and overachievers. It’s the state of business today, made possible through integrated wired and wireless networks, secure remote access, and advanced mobile applications and devices. Your users have what they need; do you? From our sponsors
IT Solutions
[image]
AT&T IP Networking for your IT needs With AT&T IP Networking, you get flexible solutions designed specifically for your company’s IT needs Learn more
AT&T
advertisement
Click Here


You are viewing a mobilized version of this site...
View original page here

How do you rate mobile version of this page?

Mobilized by Mowser Mowser