The Gateway to Computer Science Excellence
+22 votes
Given an instance of the STUDENTS relation as shown as below

$$\begin{array}{|c|c|c|c|c|} \hline \textbf {StudentID} & \textbf{StudentName} & \textbf{StudentEmail} & \textbf{StudentAge} &  \textbf{CPI} \\\hline \text{2345} & \text{Shankar} & \text{[email protected]} & \text{X} & \text{9.4}\\\hline\text{1287} & \text{Swati} & \text{[email protected]} & \text{19} & \text{9.5}\\\hline\text{7853} & \text{Shankar} & \text{[email protected]} & \text{19} & \text{9.4} \\\hline \text{9876} & \text{Swati} & \text{[email protected]} & \text{18} & \text{9.3} \\\hline \text{8765} & \text{Ganesh} & \text{[email protected]} & \text{19} & \text{8.7} \\\hline \end{array}$$
For $(\text{StudentName, StudentAge})$ to be a key for this instance, the value $X$ should NOT be equal to______.
in Databases by Veteran
edited by | 1.8k views
why not 18?

 Pronomita Dey 1

value X should NOT be equal to 19 is correct answer.

if u say why not 18 ? then i ask u why not 17 ?

3 Answers

+38 votes
Best answer
Should not eqaul to $19$.

Since if it is equal the same key will have two different values for "StudentEmail" which cannot be true by the definition of candidate/primary/super key.
by Active
edited by
+7 votes
There is already an entry with same name and age as 19. So the age of this entry must be something other than 19.
by Loyal
+2 votes
X Is NOt Equal 19


Because Primary Key  unique Key It Uniquely Identify All Tuples If It is  19  It has Same Value As Another Tuple So  Other Then 18 Id Preferble
by Junior
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,215 questions
59,981 answers
94,644 users