2,041 views

In a relational data model, which one of the following statements is $\text{TRUE}?$

1. A relation with only two attributes is always in $\text{BCNF}.$
2. If all attributes of a relation are prime attributes, then the relation is in $\text{BCNF}.$
3. Every relation has at least one non-prime attribute.
4. $\text{BCNF}$ decompositions preserve functional dependencies.

1 comment

A relation with only two attributes is always in BCNF.

https://stackoverflow.com/questions/33455459/how-is-every-binary-relation-bcnf

For any relation to be in BCNF, the following must holds for any functional dependency $X \rightarrow Y :$

Either $X \rightarrow Y$ is a Trivial Functional Dependency (i.e. $Y \subseteq X$) OR $X$ is a superkey for schema $R.$

A relation with only two attributes is always in BCNF.

For Example, Assume relation $R = \{A,B \}$ with two attributes. The only possible Non-trivial FD's are $\{A \} \rightarrow \{B \}$ and $\{B \} \rightarrow \{A \}.$
So, there are four possible cases:

1. No Non-trivial FD's hold in $R.$ i.e. $\{Cand.Key = AB \},$ Since it is an all key relation it's always in $BCNF.$

2. Only Non-trivial FD $A \rightarrow B$ holds. In this case, $\{Cand.Key = A \},$ and relation satisfies BCNF.

3. Only Non-trivial FD $B \rightarrow A$ holds. In this case, $\{Cand.Key = B \},$ and relation satisfies BCNF.

4. Both $A \rightarrow B$ and $B \rightarrow A$ holds. In this case, $\{Cand.Keys = A,B \},$ and
relation satisfies BCNF.

Hence, every Binary Relation (A relation with two attributes) is always in BCNF!

2 Answers

Best answer

Option A : A relation with only two attributes is always in BCNF

let relation R(A,B), then possible FD’s are

1. A → B, in this case A is minimal Superkey, So this relation should be in BCNF
2. B → A, in this case B is minimal Superkey, So this relation should be in BCNF
3. AB → AB , in this case AB is minimal Superkey, So this relation should be in BCNF

So, given statement is Correct.

Alternatively we can think like, We can’t further divide a relation which had only two attributes, then it must be in BCNF.

Option B : If all the attributes of a relation are Prime attributes, then the relation is in BCNF

classic counter example : R(A,B,C) with FD set = {AB → C, C → A}

in this relation all attributes are prime but this relation is not in BCNF due to “ C → A ”

Correct statement is : If all the attributes in the relation are Prime attributes, then it is in 3NF.

Option C : Every relation has at least one non-prime attribute

counter example : R(A,B,C) with FD set = {AB → C, C → A}

in this relation all attributes are prime

Correct statement is : Every relation has atleast one prime attribute.

Option D : BCNF decompositions preserve functional dependencies

for any relation, we can guarentee there exist atleast one decomposition which is in 3NF, lossless and Dependency Preserving. But we can not guarentee that atleast one decomposition which is BCNF, lossless and Dependency Preserving.

Option A is correct

Option A is true.

For option B ,

Option C,

It is also false As,

R(a,b,c) is a relation and The FD set is { a->b,b->c,c->a}

Now the candidate keys for the relation are a,b,c.

And it is fine even the Relation is in BCNF.

So option C is also false.

Option D is false as we know BCNF is lossless but does not preserve Functional dependency.

Answer:

5 votes
1 answer
1
1,214 views
4 votes
2 answers
2
1 vote
2 answers
3
9 votes
4 answers
4