How To Software The Definition of a Candidate Key Database Candidate Keys Sometimes Become Primary Keys Share Pin Email Print Ezra Bailey / Getty Images Software Databases Documents Spreadsheets Presentations Desktop Publishing Graphic Design Animation & Video by Mike Chapple An IT professional with more than 10 years of experience in the fields of databases and cybersecurity. Updated January 07, 2019 31 31 people found this article helpful A candidate key is a combination of attributes that can be uniquely used to identify a database record without referring to any other data. Each table may have one or more candidate. One of these candidate keys is selected as the table primary key. A table contains only one primary key, but it can contain several candidate keys. If a candidate key is composed of two or more columns, then it's called a composite key. Properties of a Candidate Key All candidate keys have some common properties. One of the properties is that for the lifetime of the candidate key, the attribute used for identification must remain the same. Another is that the value cannot be null. Lastly, the candidate key must be unique. For example, to uniquely identify each employee a company might use the employee's Social Security number. As you can see, there are people with the same first names, last names, and position, but no two people ever have the same Social Security Number. Social Security Number First Name Last Name Position 123-45-6780 Craig Jones Manager 234-56-7890 Craig Beal Associate 345-67-8900 Sandra Beal Manager 456-78-9010 Trina Jones Associate 567-89-0120 Sandra Smith Associate Examples of Candidate Keys Some types of data readily lend themselves as candidates: International Standard Book Numbers—ISBNs uniquely identify books and related media. The issuance of ISBNs is tightly regulated by industry gatekeepers and ISBNs are generally never re-used by publishers.Bank account numbers—Most banks do not recycle account numbers.Serial numbers—Although serial numbers aren't governed across industries, in the context of a single supplier, a serial number should always be unique.Driver license numbers—Usually, these numbers are not duplicated. However, a person who moves from state to state can have more than one DL number.National Provider ID—Physicians and other licensed medical providers each have at least one NPI that's unique to them, issued by the U.S. Department of Health and Human Services. However, some types of information that might seem like good candidates actually prove problematic: Phone numbers—Most carriers recycle phone numbers, and individual subscribers can have several phone numbers simultaneously. Universal Price Codes—UPCs are unique, but the owner of a UPC block can recycle products at will.Medical record numbers—MRNs are generally issued on a hospital level, without any sort of national guidance aboutSocial Security Numbers—Although they're theoretically unique, SSNs do get recycled, and SSN fraud is common enough to make this identifier problematic across large data sets. (In the context of an employer that verifies SSNs, this challenge isn't a problem.) Continue Reading How to Identify a Database Record Using a Superkey How BCNF Is Used in Relational Database Theory A Quick Guide to Understanding Database Dependencies How to Choose a Primary Key for Your Database Primary Keys in a Database and What Makes a Good Key What Are Some Keys Take Make DB Management Easier? Definition of a Determinant in a Database Ensure Accurate Data Using Functional Dependencies What Is a UNIQUE Constraint in a SQL Server? Serial Numbers: Everything You Need to Know Protect Your Data by Normalizing It to at Least 2NF Relationships Are the Basis for Relational Databases Why Should You Secure a Website? A Database Relation Might Not Be What You Think Learn About One-To-One Relationships in Databases Are You Making These Common Mistakes With Your Database Design?