0

My question is pretty simple. From what I've seen, it seems normalization from 1NF, 2NF, 3NF up to Boyce-Codd form seem to deal mostly the matter of non-prime attributes. If I am not mistaken, then, the following table is in Boyce-Codd form:

R(A,B,C), F = {AB->C, A->B}

with A,B being a compound primary key, which would seem odd to me.

Am I missing something here?

philipxy
  • 14,867
  • 6
  • 39
  • 83
devoured elysium
  • 101,373
  • 131
  • 340
  • 557
  • 1
    Your table is not even in `3NF` since `C` transitively depends on `A` through `B` – Quassnoi Jul 20 '11 at 15:57
  • 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 given. [See this answer.](https://stackoverflow.com/a/53386492/3404097) – philipxy May 15 '20 at 21:51
  • Right now you are just asking for us to rewrite your textbook with a bespoke tutorial. Please see [ask], hits googling 'stackexchange homework' & the voting arrow mouseover texts. Show the steps of your work following your textbook with justification & ask 1 specific researched non-duplicate question re the first place you are stuck. Quote the definitions, theorems & algorithms you are relying on. All the steps are also SO faqs. PS "odd to me" communicates nothing. PS PKs are irrelevant, CKs matter. Compound CKs are relevant in that there is a certain BCNF theorem about them. – philipxy May 15 '20 at 21:54

2 Answers2

2

If A->B then {AB} can't possibly be a primary key because it isn't minimal. Assuming therefore that A is the only key then R is in at least BCNF with respect to the dependencies AB->C, A->B.

nvogel
  • 24,981
  • 1
  • 44
  • 82
0

If A determines B (A -> B) then saying that AB determines C (AB -> C) implies that A determines C (A -> C).

Saying A -> B means that there are no two records where the B columns have different values but the A columns have the same value.

Saying AB -> C means that there are no two records where the C columns have different values but both the A and B columns have the same value. Although, because A -> B, we already know that if the A columns have the same value then the B columns also have the same value. Thus, we can say that, seeing that A -> B then AB -> C implies A -> C.

Thus, the FDs in R are:

  1. A -> B
  2. A -> C

For a relation to be in BCNF the following must hold:

  1. It must already be in 3NF
  2. There mustn't be non-trivial functional dependencies where the determinant is not a super key

As you already have a relation in 3NF, as you stated, we satisfy the 1st condition. As in all of R's FDs the determinant is a super key (A is a super key), we satisfy the 2nd condition.

Thus, R is in BCNF.

  • Your first sentence is wrong. Those 3 FDs say 3 different things. However, certain combinations of them imply certain others. Your 1st 2 bullets are wrong. Partial & transitive FDs hold, just not problem ones--you're not using correct definitions of terms for FDs & NFs. You don't clearly justify claims or give reasoning, so even with wrong claims corrected this isn't very helpful. PA Answers like this that give fragments of things people thought while solving problems don't give askers anything they can use to solve other problems. Send them to the algorithms they should be following. – philipxy May 15 '20 at 22:13
  • How is my first sentence wrong? As A uniquely identifies B and any AB pair uniquely identifies C then any A uniquely identifies C. Anyway, I'll make the answer more general as to help other people having those problems. – Alessandro Nerla May 16 '20 at 12:49