# ISRO2018-5

1 vote
1.5k views

Considering the following table in a relational database

 Last Name Rank Room Shift Smith Manger 234 Morning Jones Custodian 33 Afternoon Smith Custodian 33 Evening Doe Clerical 222 Morning

According to the data shown in the table, which of the following could be a candidate key of the table?

1. {Last Name}
2. {Room}
3. {Shift}
4. {Room, Shift}

recategorized

Candidate key:- must be able to uniquely determine every other attribute. i.e., whenever a candidate key value is repeated, all other values must repeat or in a set, candidate key cannot be repeated.

option

a:- Last Name cannot be key as smith value are repeated.

b.Room:- 33 value is repeated

c.shift:- morning repeated

d. Composite key Room+shift => Every tuple is now unique

234+morning

33+afternoon

33+evening

222+morning.

so Option D is right

edited by
1 vote
option D is correct. room, shift is a set of column that uniquely identify the database record.
Option D is correct as we cannot make only room as candidate key it may lead to ambiguity.

## Related questions

1
609 views
For a database relation $R(a,b,c,d)$ where the domain of $a,b,c$ and $d$ include only atomic value, only the following functions dependencies and those that can be inferred from them hold $a\rightarrow c$ $b\rightarrow d$ The relation is in: First normal form but not in second normal form Second normal form but not in third normal form Third normal form None of the above
The set of attributes $X$ will be fully functionally dependent on the set of attributes $Y$ if the following conditions are satisfied. $X$ is functionally dependent on $Y$ $X$ is not functionally dependent on any subset of $Y$ Both (a) and (b) None of these
Given relations $R(w,x)$ and $S(y,z)$, the result of SELECT DISTINCT $w, x$ FROM $R, S$ ls guaranteed to be same as R, if R has no duplicates and S is non-empty R and S have no duplicates S has no duplicates and R is non-empty R and S have the same number of tuples