CS FundamentalsHardAmazon · Microsoft MCQ pattern

A relation R(A, B, C) has FDs A → B and A → C, but NOT B → C or C → B (B and C are independent given A). Decomposing R into R1(A, B) and R2(A, C) — is this decomposition lossless?

  1. A. No, because B and C are never directly related by any FD
  2. B. Only if A is also a candidate key of the original R, which cannot be determined here
  3. C. No; a decomposition is only lossless if all three attributes stay in one single piece
  4. D. Yes; A is a key of R1 and a key of R2, so the intersection of R1 and R2 (which is {A}) is a superkey of at least one of them (it's a key of both), satisfying the lossless-join test

Correct answer: D. Yes; A is a key of R1 and a key of R2, so the intersection of R1 and R2 (which is {A}) is a superkey of at least one of them (it's a key of both), satisfying the lossless-join test

The standard binary lossless-join test requires the common attributes of the two pieces (here just A) to functionally determine ALL the attributes of at least one piece. Since A → B makes A a key of R1, and A → C makes A a key of R2, the common attribute A is a superkey of both halves — the decomposition is lossless (and, since A→B and A→C are each fully checkable in one piece, it is dependency-preserving too).

More DBMS and SQL questions

Exams that ask this topic