A key uniquely identifies a record in a database table. The primary key is the chosen candidate key that is less likely to change. A foreign key in one table references the primary key in another table to link the tables together in a relationship. Keys are represented visually with underlining for primary keys and asterisks for foreign keys.