A primary key identifies a row and rejects both duplicate and missing key values. Choose a stable identifier. Business names and email addresses can change or be shared, so they rarely make reliable row IDs. A composite primary key identifies a row using more than one column.
A foreign key requires a referenced value to exist. It doesn't automatically require the referencing column to be populated; use NOT NULL when a relationship is mandatory. Choose delete behavior intentionally. Cascading a customer deletion into financial records can remove history that the business needs.
These exercises inspect and create constraints in PostgreSQL itself. Catalog queries show the stored contract, but data checks are still useful when you inherit an import that has not yet been constrained. A foreign key doesn't create an index on the referencing columns automatically.
A primary key rejects missing IDs and duplicate IDs.