Attributes or set of attributes to uniquely identify a tuple in the relation is called key. OR basically column ko jo uniquely identify karade vo key hogayi us relation ki types of keys in DBMS
- Super key - Super key is a set of atttributes(columns) that uniquely identify a tuple(row).
- candidate key - It is just a minimal super key.
- Primary key - The candidate key chosen to identify a tuple uniquely in the relation. Properties of primary keys are unique and not-null.
- Foreign key - It a attirbute in one relation that identifies primary key in another relation.