A primary key (PK) is a table’s anchor for row identity. Its value must be unique and cannot be null, so it identifies one record distinctly. section 8.2.1
Two users, one name
Two users can both be named John Smith. Deleting by name could remove both accounts when only one requested closure. Use the primary key to identify the intended row instead. section 8.2.1
A foreign key can reference a primary key in another table. For example, Orders.CustomerId can reference Customers.Id. The foreign-key constraint must be explicitly defined; the column name alone does not create the link. section 8.2.1
Figure 8.2 Showing how Primary Keys and Foreign Keys work together to link tables. The child table (Orders) uses the Customer_ID as a Foreign Key to point directly back to its parent record (Customers), establishing a clear one-to-many relationship.

See how an Orders foreign key points to a Customers primary key in a one-to-many relationship. section 8.2.1





















