Consider the following table and find which of the following are candidate keys based on the data present in the table?
Name RollNo Age Ajay 11 23 Ramesh 12 23 Ravi 13 24 Manish 14 22
Consider the following table and find which of the following are candidate keys based on the data present in the table?
| Name | RollNo | Age |
|---|---|---|
| Ajay | 11 | 23 |
| Ramesh | 12 | 23 |
| Ravi | 13 | 24 |
| Manish | 14 | 22 |
Solution
A candidate key is a minimal attribute that uniquely identifies every row. In the given data, Name (Ajay, Ramesh, Ravi, Manish) and RollNo (11, 12, 13, 14) have no repeated values, so each can identify a row by itself.
Option 3: Age is not a candidate key, since the value 23 appears twice (Ajay and Ramesh).
Options 2 and 4: each leaves out the other valid key. Both Name and RollNo are unique in this data.
Names can repeat in real life, but the question asks only about the data shown.
Related questions:
2025: 20 May Shift 1
2025: 15 May Shift 2
2025: 20 May Shift 1
2025: 21 May Shift 1
2025: 14 May Shift 1