The primary key in a database is used to ensure that the data in each tuple (row) is unique in the table. The foreign key in a database provides a link between two tables and points to the primary key of another table. A relational table can have only one primary key, whereas it can have multiple foreign keys. A primary key is a mixture of NOT NULL and unique constraints on the table. A foreign key can have duplicate values in the table. Foreign keys can also have NULL records, unlike primary keys. A primary key value can't be deleted from the parent table in the database, whereas a foreign key value in a database can be deleted from the child table.