Can a relational table with just 2 attributes be in 4NF?

342 Views Asked by At

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?

1

There are 1 best solutions below

1
user15769319 On

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.