In context of
relational databases, a
foreign key is a
field (or collection of fields) in one
table that uniquely identifies a row of another table. In simpler words, the foreign key is defined in a second table, but it refers to the primary key in the first table. For example, a table called Employee has a primary key called
employee_id. Another table called Employee Details has a foreign key which references
employee_id in order to uniquely identify the relationship between both the tables.