Define Keys In Access 2010

In this article I am going to explain primary key and foreign key In Access 2010.
  • 1654

Keys

  • A key usually consists of one field, but may consist of more than one field. There are two types of keys use in access table.

Primary Key

  • Only one primary key is allowed in a table. A primary key consists of one or more fields that each record have a uniquely identify in a table.
  • Primary key provide a unique identification number, id number and a code in access table.
  • For Example, if we have a employee table where each employee have a unique id number. The employee id field is the primary key of the employee table.

Foreign Key

  • One or more foreign key allowed in a table  A foreign key contains values that correspond to values in the primary key of another table.
  • For example, if we have an department table in which each department has a employee id number that corresponds to a record in a employee table. The employee id field is a foreign key of the department table.

 

 op1.jpg

A table relationship, shown in the Relationships window.

  • A primary key, identified by the key icon next to the field name.
  • A foreign key note the absence of the key icon.

Ask Your Question

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2013 dotNetheaven. All rights reserved.