Something went wrong. Try again.
Something went wrong. Try again.
Foreign Key #
A foreign key in a @[relational database][] refers to the use of a @[key][] of one @[relation][database-relation] being used (referenced) by a second relation, forming a relationship between the two.
By using foreign keys, we can ensure that data from one table only references data that actually exists on another table, creating a very powerful way to describe the relationships between objects and prevent invalid situations from occurring.