The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+18 votes
1.2k views
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______.
asked in Databases by Veteran (116k points)
edited by | 1.2k views
0
why not 18?
+1

 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

+34 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.
answered by Active (3.3k points)
edited by
+6 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.
answered by Loyal (9.4k points)
+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
answered by Active (2.2k points)
Answer:

Related questions

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
49,397 questions
53,563 answers
185,728 comments
70,838 users