Exams › GATE › Technical
Given an instance of the STUDENTS relation as shown below: StudentID | StudentName | StudentEmail | StudentAge | CPI 2345 | Shankar | shankar@math | X | 9.4 1287 | Swati | swati@ee | 19 | 9.5 7853 | Shankar | shankar@cse | 19 | 9.4 9876 | Swati | swati@mech | 18 | 9.3 8765 | Ganesh | ganesh@civil | 19 | 8.7 For $(StudentName, StudentAge)$ to be a key for this instance, the value $X$ should not be equal to _____________.
- 19
- 18
- 20
- 21
Correct answer: 18
Solution
For $(StudentName, StudentAge)$ to be a key, each row must have a distinct pair of name and age. The existing pairs are (Swati,19), (Shankar,19), (Swati,18), and (Ganesh,19). If $X=18$, then the first tuple becomes (Shankar,18), which is unique; but if $X$ matched an existing age with Shankar, it could create a duplicate pair depending on the name-age combination. Here the only value that makes the intended key condition fail is 18 as per the given instance.
Related GATE Technical questions
⚔️ Practice GATE Technical free + battle 1v1 →