A foreign key (FK) is a column or set of columns used to create and enforce a link between data in two tables in order to limit the amount of data that may be stored in the foreign key table.
A primary key is used to ensure that each column's value is unique. The foreign key is what connects the two tables together.
A foreign key is a column (or a concatenation of columns) in a table that is identical to the primary key of another table in the database. In a relational database, the matching of foreign key values to main key values reflects data relationships.
You can use a key and cross-domain analysis job to locate foreign key candidates, pick foreign keys, and then check their referential integrity to build and validate table relationships. In the Key and Cross-Domain Analysis workspace, you find foreign keys.
The column or columns that hold values that uniquely identify each row in a table are referred to as the main key. To insert, edit, recover, or delete data from a database table, the table must have a primary key.