The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+16 votes

Given an instance of the STUDENTS relation as shown as below

StudentID StudentName StudentEmail StudentAge CPI
$2345$ Shankar [email protected] X $9.4$
$1287$ Swati [email protected] $19$ $9.5$
$7853$ Shankar [email protected] $19$ $9.4$
$9876$ Swati [email protected] $18$ $9.3$
$8765$ Ganesh [email protected] $19$ $8.7$

For $(StudentName, StudentAge)$ to be a key for this instance, the value $X$ should NOT be equal to______.

asked in Databases by Veteran (106k points)
edited by | 962 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

+30 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
+5 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 (8.6k points)
+1 vote
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)

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

42,599 questions
48,600 answers
63,733 users