search
Log In
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}
in Databases
recategorized by
1.5k views

3 Answers

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

Related questions

2 votes
3 answers
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
asked Apr 22, 2018 in Databases Arjun 609 views
2 votes
1 answer
2
1k 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$ $X$ is not functionally dependent on any subset of $Y$ Both (a) and (b) None of these
asked Apr 22, 2018 in Databases Arjun 1k views
1 vote
1 answer
3
686 views
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
asked Apr 22, 2018 in Databases Arjun 686 views
1 vote
1 answer
4
624 views
Consider the set of relations given below and the SQL query that follows: Students: (Roll_number, Name, Date_of_birth ) Coursed: (Course_number, Course_name, Instructor ) Grades: (Roll_number, Course_number, Grade) SELECT DISTINCT Name FROM Students, Courses, Grades WHERE Students.Roll_number ... of Students who have got an A grade in at least one of the courses taught by Sriram None of the above
asked Apr 22, 2018 in Databases Arjun 624 views
...