edited by
3,589 views
3 votes
3 votes

Considering the following table in a relational database : $$\begin{array}{|c|c|c|c|} \hline \textbf{Last Name} & \textbf{Rank} & \textbf{Room} & \textbf{shift} \\ \hline \text{Smith} & \text{Manager} & \text{234} & \text{Morning} \\ \hline  \text{Jones} & \text{Custodian} & \text{33} & \text{Afternoon} \\ \hline\text{Smith} & \text{Custodian} & \text{33} & \text{Evening} \\ \hline \text{Doe} & \text{Clerical} & \text{222} & \text{Morning} \\ \hline \end{array}$$

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

  1. $\text{{Last Name}}$
  2. $\text{{Room}}$
  3. $\text{{Shift}}$
  4. $\text{{Room, Shift}}$
edited by

3 Answers

Best answer
8 votes
8 votes
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
0 votes
0 votes
Option D is correct as we cannot make only room as candidate key it may lead to ambiguity.
Answer:

Related questions

5 votes
5 votes
3 answers
2
Arjun asked Apr 22, 2018
3,673 views
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$...