1

For the relation schema R(A, B, C, D, E) with the following FDs

FD1: {A,B,C} → {D,E} 
FD2: {B,C,D} → {A,E} 
FD3: {C} → {D}

I Decomposed R into a set of BCNF relations.
I got candidate keys as {A,B,C}, {B,C,D} respectively.. how do I find the subset of {A,B,C}?

My solution :
FD3 violates BCNF. Decomposing R using FD3.

R1(C,D) with FDs: 
    FD3, 
    CK: {C} 
R2(A,B,C,E) 
    with new FD: {A,B,C} → E (Decomposed from FD1) , 
    CK: {A,B,C} {BC}+ = {BC} 
  • Not a candidate key {ABC}+ = {ABCDE}
  • A candidate key {BCD}+ = {ABCDE}
  • A candidate key Candidate Keys = {ABC}, {BCD}

The result of the decomposition consists of R1 and R2.

  • But I was said there still exists a subset of {A,B,C} I’m unable to find it.
2
  • "find the subset of {A,B,C}" & "there still exists a subset of {A,B,C}" are not clear. Use correct technical terms. Use enough words, sentences & references to parts of examples to clearly & fully say what you mean. . Why are you stuck? You just showed that you have an algorithm to decompose.
    – philipxy
    Commented Jan 8, 2022 at 20:05
  • 1
    Your "I have these FDs" doesn't make sense. "These are all the FDs that hold"?--Not possible. "These are all the non-trivial FDs that hold"?--Not possible. "These are some FDs that hold"?--Question can't be answered. Find out what a cover is & what the exact conditions are to apply a particular definition/rule/algorithm. To determine CKs & NFs we must be given FDs that form a cover. Sometimes a minimal/irreducible cover. And the set of all attributes must be given. See this answer.
    – philipxy
    Commented Jan 8, 2022 at 20:07

1 Answer 1

3

Assuming that the FD are a cover of the functional dependencies of R, you can find a minimal cover of them:

B C -> A
B C -> E
C -> D

From this minimal cover, one can find easily the only candidate key, which is {B, C}.

As you have correctly said, the dependency C -> D violates the BCNF, so we can decompose R in R1, R2:

R1 = {C D}, with the the projected dependency C -> D, and C the only candidate key
R2 = {A B C E}, the projected dependencies B C -> A, B C -> E, and the only candidate key B C

Both R1 and R2 are in BCNF.

2
  • 1
    Since B C -> A and B C -> E are in the minimal cover of the dependencies of R, they hold also in R2, since all their attributes belong to R2.
    – Renzo
    Commented Jan 13, 2022 at 23:55
  • These rules are part of the so-called normalization theory. This is described in many good books on databases. There are also some of them free on internet.
    – Renzo
    Commented Jan 14, 2022 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.