In a relational database, which one of the following is CORRECT:

2025

In a relational database, which one of the following is CORRECT:

  1. A.

    A relation with only two attributes is always in BCNF.

  2. B.

    If all attributes of a relation are prime attributes then the relation is in BCNF.

  3. C.

    Every relation has at least one non-prime attribute.

  4. D.

    BCNF decomposition preserves functional dependencies."

Attempted by 378 students.

Show answer & explanation

Correct answer: A

Answer: A relation with only two attributes is always in BCNF.

Reasoning (proof):

  • Let the relation have exactly two attributes, A and B. Any non-trivial functional dependency must be either A -> B, B -> A, or have the whole set {A, B} on the left.

  • If A -> B holds, then A determines both attributes (A -> A is trivial), so A is a key (a superkey). The same argument applies if B -> A holds. If the left side is {A, B}, it is already a superkey.

  • Therefore every non-trivial FD has a superkey on the left, so the relation satisfies BCNF.

Why the other statements are false (brief counterexamples):

  • Statement: If all attributes are prime then the relation is in BCNF. Counterexample: R(A, B, C) with A -> B and B -> A (A and B determine each other) and no FD involving C. Candidate keys are {A, C} and {B, C}, so every attribute is prime, but A -> B violates BCNF because A is not a superkey.

  • Statement: Every relation has at least one non-prime attribute. Counterexample: R(A, B) with A -> B and B -> A. Candidate keys are {A} and {B}, so both attributes are prime and there is no non-prime attribute.

  • Statement: BCNF decomposition preserves functional dependencies. Counterexample: R(A, B, C) with FDs AB -> C and C -> B. Decomposing to (B, C) and (A, C) preserves C -> B but AB -> C is not preserved in any single decomposed relation; it can only be recovered by joining, so dependency preservation fails.

Summary: The two-attribute case forces any non-trivial FD to have a superkey on its left, so such relations are always BCNF. Other statements are false as shown by the counterexamples above.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor