0% found this document useful (0 votes)
182 views2 pages

(A) What Are All The Non-Trivial Fds That Follow From The Given FD'S?

The document discusses functional dependencies for two different relations with schemas R(A,B,C,D). For the first relation, it finds 11 non-trivial functional dependencies that follow from the given FDs, including C → A, BC → A and BC → D. It identifies the candidate keys as AB, BC and BD. The superkeys that are not candidate keys are ABC, ABD and BCD. For the second relation, it finds 8 non-trivial FDs, including AB → D and AD → C. The candidate keys are AB, AD, BC and CD. The superkeys that are not candidate keys are ABC, ACD, ABD and BCD.

Uploaded by

Nikola Kadic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
182 views2 pages

(A) What Are All The Non-Trivial Fds That Follow From The Given FD'S?

The document discusses functional dependencies for two different relations with schemas R(A,B,C,D). For the first relation, it finds 11 non-trivial functional dependencies that follow from the given FDs, including C → A, BC → A and BC → D. It identifies the candidate keys as AB, BC and BD. The superkeys that are not candidate keys are ABC, ABD and BCD. For the second relation, it finds 8 non-trivial FDs, including AB → D and AD → C. The candidate keys are AB, AD, BC and CD. The superkeys that are not candidate keys are ABC, ACD, ABD and BCD.

Uploaded by

Nikola Kadic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Question #4:

Consider a relation with schema R(A, B, C, D) and


FD = {AB → C, C → D, D → A}

(a) What are all the non-trivial FDs that follow from the given FD’s?

We need to compute the closures of all 15 nonempty sets of attributes.

Single Attributes:
A+ = A
B+ = B
C+ = ACD (New dependency: C → A)
D+ = AD

Pairs of Attributes:
AB+ = ABCD (New dependency: AB → D)
AC+ = ACD (New dependency: AC → D)
AD+ = AD
BC+ = ABCD (New dependencies: BC → A and BC→D)
BD+ = ABCD (New dependencies: BD → A and BD→C)
CD+ = ACD (New dependencies: CD → A)

Triples of Attributes:
ABC+ = ABCD (New dependencies: ABC → D)
ACD+ = ACD
BCD+ = ABCD (New dependencies: BCD → A)
ABD+ = ABCD (New dependencies: ABD → C)

All the Attributes:


ABCD+ = ABCD

So, we get a total of 11 non-trivial FDs.

(b) What are all the candidate keys of R?


From the closures above, we find that AB, BC, and BD are keys, because they have
ABCD as the closure, and they are minimal.

(c) What are all the superkeys of R that are not candidate keys?
The superkeys are all those that contain one of those three candidate keys.
Thus, the superkeys are ABC, ABD, BCD, and ABCD.

1
Question #5:
Consider a relation with schema R(A, B, C, D) and
FD = {AB → C, BC → D, CD → A, AD→B}

(a) What are all the non-trivial FDs that follow from the given FD’s?

We need to compute the closures of all 15 nonempty sets of attributes.

Single Attributes:
A+ = A
B+ = B
C+ = C
D+ = D

Pairs of Attributes:
AB+ = ABCD (New dependency: AB → D)
AC+ = AC
AD+ = ADBC (New dependencies: AD → C)
BC+ = BCDA (New dependencies: BC → A)
BD+ = BD
CD+ = CDAB (New dependencies: CD → B)

Triples of Attributes:
ABC+ = ABCD (New dependency: ABC → D)
ACD+ = ACDB (New dependency: ACD → B)
BCD+ = BCDA (New dependency: BCD → A)
ABD+ = ABDC (New dependency: ABD → C)

All the Attributes:


ABCD+ = ABCD

So, we get a total of 8 non-trivial FDs.

(b) What are all the candidate keys of R?


AB, AD, BC, CD are keys, because they have ABCD as the closure, and they are
minimal.

(c) What are all the superkeys of R that are not candidate keys?
The superkeys are ABC, ACD, ABD, BCD, and ABCD.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy