What is a foreign key?

Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.

What is a foreign key?

Rating:

A foreign key is the primary key of one entity that is copied into another entity. The objective of a foreign key is to provide a relationship between the two entities. The example given below describes a foreign key. For example, there are two tables, Author and Book.



Author
AuthorID
Name
Contact No.
Address
Book

BookID
Title
Category
AuthorID


Here, AuthorID is the primary key of the Author table, and it is migrated from the Author table to the Book table. In the Book table, it is referred to as the foreign key.

Note: Here, in the above example, AuthorID becomes the foreign key in the Book table.


Rating:



Other articles

Click here to Article home

MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW Certification: CIW foundation, CIW Professional, Site Designer    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.
 
HACKER SAFE certified sites prevent over 99.9% of hacker crime.