Multivalued dependency confusion

863 views Asked by At

I am struggling with the concepts of 4NF and Multivalued Dependencies (MVDs).

I am looking at a supplementary book for the course I am currently taking and one of the examples is below.

The book states the asterisks refer to a unique key or a composite attribute key.

Given: R(A*,B,C*) and the set {(A,B):R,(B,C):R} satisfies the lossless decomposition property.

Does the multivalued dependency B->>C hold?
Is B definitely a unique key?
Is R in 4NF?

I understand lossless decomposition - if you take the natural join of the two sets above - you are given the original dataset i.e in this case A,B,C.

But I just cannot grasp how to take the given information and prove/confirm that B->>C holds or if it does not.

I emailed my professor about my confusion and he just told me to look over his notes (which I've obviously done numerous times) and it's gotten me nowhere.

1

There are 1 answers

0
philipxy On

Does the multivalued dependency B->>C hold?

You have been told some things about MVDs. One of them is probably:

A decomposition of R into (X, Y) and (X, R − Y) is a lossless-join decomposition if and only if X ->> Y holds in R.

In your case R is {A,B,C}, X is {B}, Y is {A} and R - Y = {A,B,C} - {A} = {B,C}. So a decomposition of R into (B,A) and (B,C) is a lossless-join decomposition if and only if {B,A} ->> {B,C} holds in R. But we are given that decomposition of R into (B,A) and (B,C) is a lossless-join decomposition. So {B,A} ->> {B,C} holds in R.

Is B definitely a unique key?

I can't make sense of that.

Maybe you are trying to say that we are given that {A,C} is a CK (candidate key) of R but that there might be other CKs and you are trying to ask whether the decompositionality means that {B} must also be a CK of R. Let's look for a counterexample. Pick a simplest example. Suppose R is {(a,b,c1),(a,b,c2)} = {(a,b)} JOIN {(b,c1),(b,c2)}. This agrees with R CK {A,C} & R MVD {B,A} ->> {B,C}. But b appears with c1 and c2 so {B} does not functionally determine all other attributes so {B} is not a CK of R. So that CK and that MVD do not force that {B} is a CK.

Is R in 4NF?

You have been told some things about 4NF. One is probably that:

A Table is in 4NF if and only if, for every one of its non-trivial multivalued dependencies X ->> Y, X is a superkey

The MVD {B,A} ->> {B,C} is non-trivial. But to show whether R must be in 4NF or must not be in 4NF or that we can't tell, you are going to have to address possible sets of non-trivial MVDs that could hold in R and CKs that R could have.