Database keys are used to establish relationships between tables in a relational database and uniquely identify records. There are several types of keys: super keys identify tuples within a relation using one or more attributes; candidate keys are minimal super keys; the primary key is the candidate key chosen to uniquely identify tuples; alternate keys are other candidate keys not used as the primary key; a composite key is a primary key formed from multiple attributes; and a foreign key in one table references the primary key in another table to link the tables.