1/24/2018 - 10:52 AM

Foreign Keys

\!h At the basic level:
Primary keys for one table that appear in a different table are foreign keys.
For example, customer_id would be a primary key in its customers table, but a foreign key when it appears in any other table.
Foreign keys generally have more descriptive names because they work across multiple tables.

\!h Used in joins:
The most common joins will join a foreign key from one table with the primary key from another table.