Assignment 4
Assignment 4
Total Marks : 20
Question 1
Consider the relation TICKET(PNR, DERARTURE, ARRIVAL, SEATNO, COACHNO) with the fol-
lowing functional dependencies.
FD1: {PNR, DEPARTURE}→ARRIVAL
FD2: ARRIVAL→SEATNO
FD3: {DEPARTURE, SEATNO}→COACHNO
Which of the following attributes cannot functionally determine COACHNO?
Marks: 2 MCQ
a) {ARRIVAL}
b) {PNR, DEPARTURE}
d) {DEPARTURE, ARRIVAL}
Answer: a)
Explanation: The closure of ARRIVAL contains {ARRIVAL, SEATNO} only. The closure of all
other given sets of attributes contains COACHNO.
1
Question 2
Consider the following relation: CLASS(ID, BUILDING, STUDENTS, FACULTIES, HOURS) and
the following functional dependencies.
FD1: FACULTIES→STUDENTS
FD2: {STUDENTS, HOURS}→ID
FD3: FACULTIES→ID
FD4: {ID, HOURS}→FACULTIES
Marks: 2 MCQ
a) {ID, FACULTIES}
c) {BUILDING, FACULTIES}
Answer: d)
Explanation: BUILDING and HOURS are not reachable by any of the FDs. It is hence evident
that the key must include these two attributes. On the other hand, the closure of {BUILDING,
FACULTIES, HOURS} produces {ID, BUILDING, STUDENTS, FACULTIES, HOURS}.
2
Question 3
Consider a relation READER(ID, NAME, PHONE) with the following functional dependencies.
FD1:ID→NAME
FD2:NAME→PHONE
The current instance of this schema contains the tuple {1, Clara, 10428658}.
Which of the following tuples can be inserted? Marks: 2 MCQ
Answer: c)
Explanation: ID is the key and should be uniquely identifying NAME. So ID,NAME cannot
be 1, Stacy in the new tuple. So, options b) and d) are invalid. Since NAME uniquely identifies
PHONE, Clara cannot be associated with any other PHONE number except 10428658. So,
option a) is invalid. Hence, option c) is correct.
3
Question 4
Consider the following instance.
CONTEST
ID PARTICIPANT CATEGORY
A1 AMAN DANCE
A1 AMAN PAINTING
A2 AMAN DANCE
A2 AMAN MUSIC
Which of the options represent the complete set of non-trivial functional dependencies that
hold on CONTEST? Marks: 2 MCQ
b) ID→PARTICIPANT, CATEGORY→PARTICIPANT
Answer: d)
Explanation: ID and CATEGORY can uniquely identify PARTICIPANT. Hence, the set of FDs
given in option d) are correct and non-trivial.
4
Question 5
Consider the relation KEYSTORE(KID, KeyType, LockType, KeyColor, Material, Mfd) with
the following functional dependencies.
FD1: {KID, KeyType}→LockType
FD2: {KeyColor, LockType}→{KID, Material}
FD3: Material→Mfd
Which of the following is (are) not the candidate key(s)? Marks: 2 MSQ
Answer: c), d)
Explanation: From the given functional dependencies, it can be observed that the clo-
sure of {KID, KeyType, KeyColor} and {LockType, KeyType, KeyColor} produces all the
attributes. Thus these are the candidate keys. Hence options c) and d) are correct.
5
Question 6
Consider the following instance.
TravelGuide
TravelDate TravelMonth Span Location Stay Budget
12 December 8 Paris 4 500000
12 August 20 Paris 4 460000
21 December 8 Santorini 4 386000
21 August 20 Santorini 4 400000
b) Budget→Stay
c) TravelDate→{TravelDate, Location}
d) TravelMonth→Budget
Answer: d)
Explanation: For TravelMonth→Budget, it can be seen that the same value of December
in TravelMonth is associated with two different values of Budget (500000 and 386000) and
August is associated with 460000 and 400000. Hence, TravelMonth cannot uniquely identify
Budget. Hence, the dependency does not hold and option (d) is correct.
6
Question 7
Consider the relation TimeCounter(LogID, Days, Hours, Mins, Secs) with the following
functional dependencies:
FD1: LogID→{Days, Hours}
FD2: Days→Mins
FD3: {Hours, Mins}→Secs
FD4: Secs→LogID
Which of the following functional dependencies violate the BCNF form?
Marks: 2 MCQ
a) FD1
b) FD2
c) FD3
d) FD4
Answer: b)
Explanation: From the given functional dependencies, the candidate keys can be identified
as LogID, Sec, {Days, Hours} and {Hours, Mins}. FD2 is neither trivial nor the L.H.S of
this dependency form a superkey of the given relation and hence, violates BCNF form. Hence,
options (b) is correct.
7
Question 8
Consider the relation Carnival(CID, Location, Span, RideCount, ShowCount, StartTime,
EndTime, Crowd) with the following functional dependencies:
FD1: CID→{Location, Span, RideCount}
FD2: {CID, RideCount}→ShowCount
FD3: {ShowCount, StartTime, EndTime}→Crowd
FD4: StartTime→{EndTime, Crowd}
Which of these functional dependencies can be eliminated without changing the primary key
of the relation? Marks: 2 MCQ
a) FD1
b) FD2
c) FD3
d) FD4
Answer: c)
Explanation: The given functional dependencies imply that only attributes CID and StartTime
cannot be reached from any other attributes. Hence, the key for this relation can be evaluated
to be {CID, StartTime}. If we remove any other FD except FD3, the key of the relation will
change. Hence, option (c) is correct.
8
Question 9
Consider the relation Office(OID, Emp, Branch, Dept) with the following functional depen-
dencies:
FD1: {OID, Emp}→Branch
FD2: Branch→Dept
FD3: Dept→OID
What is the number of candidate keys for the given relation? Marks: 2 MCQ
a) 1
b) 2
c) 3
d) 4
Answer: c)
Explanation: The candidate keys of the given relation are {OID, Emp}, {Emp, Branch} and
{ Emp, Dept}. Hence, option (c) is correct.
9
Question 10
Consider the relation Email(Sender, Receiver, Date, Time, Subject) with the following
functional dependencies.
FD1: {Receiver, Date}→Time
FD2: {Sender, Date}→{Receiver, Subject}
FD3: Receiver→Subject
What is the highest normal form for the given relation? Marks: 2 MCQ
a) 1 NF
b) 2 NF
c) 3 NF
d) BCNF
Answer: b)
Explanation: The primary key of the given relation is {Sender, Date}. in FD3, a non
prime attribute depends on another non prime attribute. Hence, option (b) is correct.
10