Learn the definitions and examples of candidate key, primary key, super key, composite key, secondary key, and foreign key in DBMS. See how to identify and use these keys in relational databases. Learn the definitions and properties of seven types of keys in DBMS, such as primary key, candidate key, super key, foreign key, composite key, alternate key, and unique key. See how to identify and use keys to ensure data integrity and uniqueness in relational databases. Keys in DBMS help ensure data integrity and consistency by uniquely identifying each record in a table, and there are different types of keys, such as primary keys, foreign keys, candidate keys, alternate keys, and composite keys. A key refers to an attribute/a set of attributes that help us identify a row (or tuple) uniquely in a table (or relation). A key is also used when we want to establish relationships between the different columns and tables of a relational database. The individual values present in a key are commonly referred to as key values.