A primary key is a key that is uniquely identifiable to each row within a database. It cannot be null and may be composed of multiple foreign keys.

A foreign key is a key that references a primary key in another table, creating a relationship.