The GATE Grind

GATE 2014 CS (CS2) – Question 32

Databases · Integrity Constraints and Normal Forms · 1 mark · Numerical answer

STUDENTS has rows (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 of this instance, X must NOT equal what value?

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 19 to 19

Explanation

Another student named Shankar already has age19. If X=19, the two rows share the pair(StudentName,StudentAge), violating uniqueness for the proposed key. Thus X must not equal **19**. The two Swati rows already have distinct ages19and18.