Foreign key
From Free net encyclopedia
A foreign key (FK) is a field or group of fields in a database record that point to a key field or group of fields forming a key of another database record in some (usually different) table. Usually a foreign key in one table refers to the primary key (PK) of another table. This way references can be made to link information together and it is an essential part of database normalization. Foreign keys that refer back to the same table are called recursive foreign keys.
For example, a person sending an e-mail need not include the entire text of a book in the e-mail. Instead, they can include the ISBN of the book, and interested persons can then use the number to get information about the book - or even the book itself. The ISBN is the primary-key of the book, and it is used as a foreign-key in the e-mail.
The use of a foreign key often assumes its existence as a primary key somewhere else. Improper foreign key/primary key relationships are the source of many database problems (see referential integrity).
A foreign key constraint is a constraint that data which serves as a foreign key in one database record cannot be removed as there is still data in another record that assumes its existence.
See also
de:Schlüssel (Datenbank)#Fremdschlüssel fr:Clé étrangère vi:Khóa ngoại lai