foreign key

Also found in: Dictionary, Financial, Acronyms, Wikipedia.

foreign key

A column in a database table containing values that are also found in some primary key column (of a different table). By extension, any reference to entities of a different type.

Some RDBMSs allow a column to be explicitly labelled as a foreign key and only allow values to be inserted if they already exist in the relevant primary key column.

This article is provided by FOLDOC - Free Online Dictionary of Computing (

foreign key

In relational databases, it is a field in one table that is indexed in another. Foreign keys provide the building blocks for relating tables. For example, in a customer order table, the salesperson field might contain an employee number. That field would be a foreign key in the table, because the employee table would be indexed on employee number. See entity relationship model.

Foreign Keys
Note the "FK" indications in this Erwin entity relationship modeling program. Every foreign key is a field in one table that is indexed in another. (Example courtesy of Logic Works, Inc.)
Copyright © 1981-2019 by The Computer Language Company Inc. All Rights reserved. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher.
References in periodicals archive ?
When both entities are mandatory, each entity becomes a table, and the key of either entity can appear in the other entity's table as a foreign key. One of the entities in an optional relationship should contain the foreign key of the other entity in its transformed table.
The L1 information stored at the meta-level permits the implicit definition of the domain-dependent database schema, including information about primary and foreign keys. The persistence schema for this solution remains constant for every domain, easing the definition of the database schema used by the repository.
Indicate the primary key in each relation by underlining; and double-underline or italicize foreign keys.
In this association, the table courses contains the primary key and plays the role "primary" and the table chapters containing the foreign key plays the role "foreign".
The second case is presented below: Gene_Product Database: GeneProduct relation ID Symbol DBRef Species Int Primary Key Varchar2 Varchar2 Integer Foreign Key Foreign Key Type Full_Name Varchar2 Char Genome Database: Genome relation Gene_ID Species CHR Strend Int Primary Key Int Foreign Key Varchar2 Int Gene_Name Description Varchar2 Varchar2 Global Schema: Our proposed model ID Symbol Dbxref Species Type CHR Strend Description Full_Name Global Schema: [8, 13] ID Symbol Species Type Full_Name CHR Strend and Description DBxref
The relationship classes are designed to relate two entities based on the primary key and foreign key fields.
If SSN is chosen as primary key, it must be included as a foreign key in the Car-table in order to link a car to its owner.
That is, before a record containing a foreign key can be written, the object of the reference must exist as the primary key of the target table.
One of my noticeboards is devoted to foreign key rings.
The field or fields used to link to a primary key in another data table are known as foreign keys and a foreign key is any field(s) used in a relationship.
If E has its own primary key, then that is also the primary key of [Tau](E); the primary keys of the constituent entities should be added to [Tau](E) as foreign keys. If not, then the primary key of [Tau](E) is the combination of the primary keys of the constituent entities; each component of the primary key is also a foreign key referring to the relation from the appropriate entity.
He presents a notion of musical metaphor (according to him, this is expressed in syntactic incongruity, as when Beethoven introduces a foreign key into a simple lyrical passage) without ever consulting the stylistic theorists or philosophers of metaphor; Ricoeur and Max Black, for example, are not mentioned.

Full browser ?