Primary Key vs Candidate Key
A candidate key is any column set that could be the PK (unique + not null). You pick one candidate as the PRIMARY KEY. The others stay UNIQUE (alternate keys). roll and (aadhaar) might both be candidates — you pick roll as PK and UNIQUE on aadhaar.
This is theory (DBMS textbooks). In MySQL you implement: one PRIMARY KEY, other candidates as UNIQUE NOT NULL.
Trap — reciting ‘candidate key’ without an example table.
On the example next to this theory: Primary Key vs Candidate Key — keys and constraints protect data integrity; indexes speed lookups.
students.id ← PK (unique)
▲
│ FK
marks.student_idExam tip
Candidates: roll or aadhaar. Pick one PK, UNIQUE the other.