Home > Ask the Oracle Experts > (Archive) Database Design Questions & Answers > Candidate key explained
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

Candidate key explained

Pat Phelan EXPERT RESPONSE FROM: Pat Phelan

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 27 September 2002
Can you explain what a candidate key is, in simple terms?

>
EXPERT RESPONSE

A Candidate Key (CK) is a column or group of columns that uniquely describe every row in a table.

For instance, in a table that describes people (employees, customers, club members, whatever), there are many columns that describe those people. If you accept the assertion that you can't have two people with the same name (which is a VERY bad idea in my experience), one of your CKs could be the person's name. If you accept the assertion that you can't have two people with a given phone number (again, a VERY bad idea in my experience), one of your CKs could be the phone number. Especially with people, just about every CK I can think of is subject to exceptions.

A Surrogate Key (SK) is an arbitrary value that is used solely by the database (and therefore by any programs that use that database) to uniquely identify a row. This can be a GUID, an "automagically" assigned number, or just some arbitrary value that happens to be unique for every row. SKs are guaranteed to be unique (that is part of their definition), so they are always CKs. Using an SK can be extremely convenient because it allows the database to function independently of any changes to the business rules that make other CKs unique.

For More Information


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
(Archive) Database Design
Editing object-type data on the Enterprise Manager Console
Database returning duplicate records
Checking for corrupt blocks
Loading PDF files using SQL*Loader
Cycle relationships in ER diagram?
Logical and physical data models explained
Wide or deep?
Is Visual FoxPro a flat database?
Merging hotels and data
Creating a purchase form for a hospital database

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2003 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts