What is a primary key? Its function?

October 2016

What is a primary key? Its function?


A primary key is unavoidable in an RDBMS. For a table, it enables each record to be unique without ambiguity. Indeed, it does not allow duplicates. Moreover it is indexed by default to improve search time. In a table CUSTOMERS example, the risk to differentiate each on his name is too big. Indeed, homonyms exist. Therefore it creates a field CODE_CLIENT where each code is unique in designating it as primary key to ensure that every client is different. Access will check this. It's like a file number, insurance, bank account or social security.

Related :

This document entitled « What is a primary key? Its function? » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.