Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3.3.5 Exercises for Section 3.3 Exercise 3.3.1: For each of the following relati

ID: 3587777 • Letter: 3

Question

3.3.5 Exercises for Section 3.3 Exercise 3.3.1: For each of the following relation schemas and sets of FD’s: a) R(A, B, C, D) with FD’s AB — C, C -> D, and D A. b) R (A ,B ,C ,D ) with FD’s B —> C and B D. c) R{A, B, C, D) with FD’s AB -+ C ,B C -> D, CD -> A, and AD B. d) R(A, B, C, D) with FD’s A B, B C, C ->• D, and D A. 3.4. DECOMPOSITION: THE GOOD, BAD, AND UGLY 93 e) R(A, B, C, D, E ) with FD’s A B —^ C , D E —¥ C, and B —¥ D. f) R(A, B, C, D, E ) with FD’s A B —¥ C , C —^ D, D —¥ B, and D —¥ E. do the following: i) Indicate all the BCNF violations. Do not forget to consider FD’s that are not in the given set, but follow from them. However, it is not necessary to give violations that have more than one attribute on the right side. ii) Decompose the relations, as necessary, into collections of relations that are in BCNF.

Explanation / Answer

a)R(A, B, C, D)
FD’s are : AB -->C, C -> D, and D--> A.
Let us find attribute clousers:
A+ = A
B+ = B
AB+ = ABCD
C+ = CDA
D+ = DA

Now check weather given FD's are keys to relation R.
AB is a key to R. Because clouser of AB+ contains relation R.
C is not a key to R. Because clouser of C+ doesn't contain relation R.So that decompose R into (CDA)(AB)
D is not a key to R. Because clouser of D+ doesn't contain relation R.So that decompose R into (CA)(DA)(AB)

Therefore, (CA)U(DA)U(AB) is in BCNF.


b) R (A ,B ,C ,D )
FD’s are B--> C and B-->D.
Let us find attribute clousers:
A+ = A
B+ = BCD
AB+ = ABCD
C+ = C
D+ = D

Now check weather given FD's are keys to relation R.
B-->D is not a key to R. Because clouser of B+ doesn't contain relation R.So that decompose R into (ABC)(BD)

therefore (ABC)(BD) in BCNF


c) R{A, B, C, D)
FD’s are AB --> C ,B C --> D, CD --> A, and AD--> B.
A+ = A
B+ = B
AB+ = ABCD
BC+ =BCDA
CD+ = CDAB
C+ = CDAB
D+ = D
AD+ = ADBC
Now check weather given FD's are keys to relation R.
AB --> C is a key to R. Because clouser of AB+ contains relation R.
B C --> D is a key to R. Because clouser of AB+ contains relation R.
CD --> A is a key to R. Because clouser of AB+ contains relation R.
AD-->B is a key to R. Because clouser of AB+ contains relation R.

There are no violations and given FD's are in BCNF


AB --> C is a key to R. Because clouser of AB+ contains relation R.
AB --> C is a key to R. Because clouser of AB+ contains relation R.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote