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

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 (101k points)
edited by | 861 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

+29 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.4k 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.1k points)


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

39,530 questions
46,674 answers
139,829 comments
57,598 users