0

If there is a relation:

studentColor(studentNumber, favouriteColor)

And I have this dependency:

studentNumber -> favouriteColor

So this means a student can only have one favourite color but a favourite color can be chosen by many students, so I understand that there is a multi-value dependency:

favouriteColor ->> studentNumber

so this relation is only qualified to be in BCNF.

But I was wondering, if its:

studentNumber -> favouriteColor

favouriteColor -> studentNumber

this means that if a color is chosen by a student, it can't be picked anymore, so there isn't any multi-value dependency here. Since I heard that a relation need to satisfy these rule to be in 4NF

It should be in the Boyce-Codd Normal Form (BCNF). the table should not have any Multi-valued Dependency.

Does that mean it is in 4NF?

philipxy
  • 14,867
  • 6
  • 39
  • 83
Astoach167
  • 91
  • 1
  • 7
  • (Prefab comment:) 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 Apr 25 '20 at 02:47
  • "BCNF [...] should not have any MVDs" is false. Whenever there is a FD there are certain MVDs, because x->y implies x->>y. Find, quote & use definitions of BCNF, 4NF, FD & MVD. Also this is not clear. In particular it's not clear exactly what you are starting with, what your overall claim is, what your in-between claims are & what is your justification for each claim per earlier ones. Explain why "so". Please edit to be clear. Use enough words, sentences & references to parts of examples to clearly & fully say what you mean. PS Only certain FDs violate BCNF & only certain MVDs violate 4NF. – philipxy Apr 25 '20 at 02:53
  • You have some misconceptions about what it means for a MVD to hold. studentNumber -> favouriteColor implies studentNumber ->> favouriteColor. But you wrongly reason that it holds & that if it holds then 4NF doesn't hold. (In fact to violate BCNF there has to be overlapping CKs.) PS To reason simply re MVDs use these: a given MVD holds iff/when a certain JD does; a given JD holds iff/when a relation value/variable is the join of certain others; `r JOIN s` is the tuples satisfying `r(...) AND s(...)`; x->y in r iff/when `r(...) IMPLIES y=f(x)`, ie iff/when `r(...)` is `p(...) AND y=f(x)`. – philipxy Apr 25 '20 at 04:32

1 Answers1

0

I would add what I was/is being taught in my Database Systems and Management Course

We were told that every relation that is in BNCF is not in 4NF iff

  1. There are at least 3 attributes

  2. There exists A ->-> B and A->->C

  3. B and C are independent .

Here the ->-> double arrays refer to multivalued dependency.

Thus this directly leads to the conclusion that If the relation consisting of 2 attributes is in BCNF then it is in 4NF.

  • This doesn't answer the question, which is about the soundness of the asker's (unclear unsound) argument. PS "directly leads"--Please spell it out. PS Where did you get this alleged theorem? What are A, B & C? What is "independent"? (Which doesn't mean anything in particular, although it's probably trying to say something about JDs. Although 2 & 3 don't matter to "directly leads".) – philipxy Apr 26 '21 at 17:32