Types of Keys in DBMS

There are different types of keys in DBMS such as :

1. Primary Key - It is a column in the table which has unique values. 
For Example : id, email, etc.

2. Candidate Key - They are columns in the table which are eligible to become primary key. 
For Example : mobile, email, etc.

3. Foreign Key : It is column in the table which is primary key in another table.

4. Secondary Keys : They are the columns in the table which are not primary key.

5. Composite Key : A key that has more than one attributes is known as composite key. It is also called compound key.

Comments