Identify Candidate Keys from the following table.
RollNo Name 123 Amit 123 Anil
Identify Candidate Keys from the following table.
| RollNo | Name |
|---|---|
| 123 | Amit |
| 123 | Anil |
Solution
A candidate key is a minimal set of attributes whose values are unique for every row.
In the table, RollNo has the same value (123) in both rows, so it cannot identify a row. Name has different values (Amit, Anil), so it identifies each row uniquely. Since Name is a single attribute, it is minimal, so it is the candidate key.
Option 1: RollNo repeats (123 twice), so it is not unique.
Option 3: RollNo, Name is unique, but it is only a superkey. It is not minimal because Name alone already works.
Option 4: a candidate key does exist here, namely Name.
Related questions:
2026: 13 May Shift 2
2025: 13 May Shift 2
2026: 19 May Shift 1
2026: 24 May Shift 1
2026: 21 May Shift 1