Qinglian
• Home Page
• Assignments Due • Progress Report
• Handouts
• Tutorials
• Homeworks
• Lab Projects
• Log Out
Help
Copyright © 2007-2021 Gradiance Corporation.
Gradiance Online Accelerated Learning
Spring-21 HW3
Number of questions: 7 Positive points per question: 15.0 Negative points per question: 0.0
1. Which of the following relations is in Third Normal Form (3NF)?
a) R(VWXY) FD’s: V → Y; Y → X; Y → W
b) R(VWXY) FD’s: X → W; V → Y
c) R(VWXY) FD’s: WXY → V; VW → X; Y → V; W → X
d) R(VWXYZ) FD’s: WX → V; Y → WX; V → YZ; Z → X
2. Suppose relation R(A,B,C,D) has the tuples:
And the relation S(F, G, H) has tuples:
A
B
C
D
a
1
4
e
b
2
10
e
c
7
6
f
a
3
19
e
F
G
H
b
15
21
b
4
5
c
7
2
b
5
4
a
20
11
d
6
3
b
17
12
Which of the following tuples is in the theta-join of R and S with the condition A = F AND C < G AND (D = 'e' OR D = 'f' ) AND (A = 'a' OR A = 'b') AND G > H?
a) (b, 2, 10, e, b, 17, 12) b) (a, 3, 19, e, b, 4, 5)
c) (b, 2, 10, e, b, 5, 4) d) (a, 1, 4, e, c, 7,2)
3. Determine the keys and superkeys of the relation R(MNOPST) with FD’s: NS → T, MNO → P, NO → T, MPST → N Then, demonstrate your knowledge by selecting the true statement from the list below. Each statement must include all the possible values.
a) Superkeys: NOPS, NPST, OST, MNOP
b) Superkeys that are not keys: MOPST, MNOS
c) Keys: MNOS, MOPST
d) Keys: MNOPT, ST
4. A basis for a set of FD’s F is any set G of FD’s whose closure is the same as the closure of F. That is, exactly the same FD’s follow from F as
from G. In addition, a basis must consist of a minimal set of nontrivial FD’s. Suppose we have a relation R(W, M,X, Y, Z) with FD’s W → M, M → X, X → Y, Y → Z, Z → W. Suppose we project R onto attributes WMXY. Describe all the bases for the set of FD’s that hold in WMXY. Given a set of FD’s, select statements that correctly explain if the set is a basis or not.
a) W → M, M→ X ,X → W, X → Y, Y → X: NOT a basis
b) W → M, M→ X, X → Y, Y → W: NOT a basis
c) W → X, W → Y, X → Y, Y → X, M→ X, M→ Y: a basis
d) Y → W, Y → X, M→ W, W → X, X → W: NOT a basis
5. Let the relation A(MNOPQRST) satisfy the following functional dependencies: N → P, MO → Q, RS → T, Q → S, OP → M, PT → R. Which of the following FD’s is also guaranteed to be satisfied by A? Recall that an FD of the form X → BC, where X is a set of attributes and where each of B and C is an attribute, is actually two FDs X → B and X → C. We say that an FD X → BC is guaranteed to be satisfied by a relation schema if and only if each of X → B and X → C is guaranteed to be satisfied by this relation schema.
a) NRS→PT
b) RST→MP
c) ORS→TQ
d) QRS→MT
6. Which of the following relations is in BoyceCodd Normal Form (BCNF)?
a) R(LMNOP) FD’s: MNO → P; LMN → O
b) R(LMNO) FD’s: MNO → L; LNO → M; M → L
c) R(LMNOP) FD’s: LM → P; N → O; MP → N
d) R(LMNO) FD’s: LN → M; MO → L; MO → N; LM → O
7. Which of the following relations is correctly decomposed into the minimal number of relations that are collectively in BCNF (BoyceCodd Normal Form)?
a) R(ABCDE) FD’s: AB → C; C → D; D → E into R1(ABC), R2(CD), R3(DE)
b) R(ABCD) FD’s: A → B; A → C; D → A into R1(AB), R2(AC), R3(DA)
c) R(ABCDE) FD’s: B → CD; A → E into R1(ABCDE), R2(AE)
d) R(ABCD) FD’s: C → B; C → D; B → A into R1(CD), R2(AB)
Submit Homework