Ph: 2023428513
Report as spam Discussion  -  Post 17 of 69
Duplicate records
True, a system-generated primary key will mean that no two records will ever be exactly the same, but there is nothing to prevent the same customer being entered twice and ending up with two different customer ID's. Sure the records aren't exactly the same, but they really are the same person. Anyone that has been involved in "de-duping" a large table will attest to how much fun tracking this can be.

Another important consideration is how quickly new records must be generated. If you are creating new records quickly, auto-generated is the only way to go. If new record creation is more leisurely, a character field can be used. For example, a product part number might be part of a series and contain some information about the part itself.

At one place I worked the part numbers matched the original catalog numbers. TA17-580 might be an air brake cam for a semi-trailer. The cams were left and right handed. 580 would be the right and 581 would be the matching left. The TA stood for trailer axle. Each value in the part number had some relation to the specification of the part. The part numbers held meaning for the customers, system-generated numbers do not.

Postal codes have meaning in each digit as do Social Security numbers and amateur radio license numbers. Somewhere, these values are the primary key for a record, even though they are not meaningless system generated values.

When designing a database there are no rules as simple as the one you propose. Each relationmust be examined alone, candidate keys identified and then decisions made based on a wide number of factors including performance, maintainability, readability and confidentiality.
Posted: 03/27/2002 @ 06:17 AM (PST)
[image]
rick@...    [image] 1
Job Role: Software / Applications Development
Location: North York, Ontario
Member since: 11/23/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]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
Windows XP Professional Administration
Microsoft Windows XP's enhanced functionality and business productivity improvements can provide a significant payoff for your organization--but only ...
Buy Now
Windows XP vs. Mac OS X
This presentation, entitled Standardizing on Windows XP Instead of MAC OS X, provides a pre-packaged option for defending Windows XP against MAC OS X. ...
Buy Now
[ http://techrepublic.com.com/html/tr/tpg_iframe.html ]
A ZDNet brand Site Help & Feedback

Popular on CBS sites: CES | Spore | iPhone 3G | Katy Perry | Antivirus Software | GPS | Recipes | Macworld | NFL

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

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

Gifts for Geeks

[image] Find a gift for your favorite geek in the TechRepublic 2008 Geek Gift Guide. [image] Flip Mino
[image]
Amazon Kindle [image] Roku Netflix Player [image] Acer Aspire One [image] FPS Gaming Vest
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