Foreign Key

A column or set of columns in a table whose values are required to match at least one PrimaryKey values of a row of another table, or (in some interpretations of the term) be a distinguished null value.

It should be noted that the ForeignKey concept is not part of the fundamental RelationalModel, but is only a special (and very common) case of a DatabaseConstraint? involving two tables. Database management products often provide explicit, convenient support for this type of constraint.


RelationalWeenies don't like to hear this (it is often claimed that RelationalHasNoPointers?), but the ForeignKey is the relational database equivalent of an object reference. While operating at a higher level then a physical address (ForeignKeys say nothing about the underlying physical representation of the database), they serve the same purpose--to allow data in one entity to reference another. Note the word reference, not pointer.

CategoryDatabase


EditText of this page (last edited June 4, 2004) or FindPage with title or text search