A foreign key is a common component that links data in two tables together. The foreign key refers to the primary key of another table called the parent table. The table containing the foreign key is called the child table.