Relational Database Design : Candidate Key

Why keys are so important in Relational Database design.

Types of keys

Candidate Key

´This is field or set of fields which uniquely identifies a single instance. Each table must have a candidate key.

Similar things are also being by Primary key as well. Primary key also uniquely identifies a single instance. But here is s difference between primary key and Candidate key. Primary key is only one but candidate key can be more than one.

Student{ID, F_name, M_name, L_name, Age} → Primary Key ID

ID and {First_name, Last_name, DOB}. → Candidate key can be ID and another candidate key can be combination of FirstName LastName and date of birth.

Software engineer, Leading highly scalable product @scale of million records per day.