CS FundamentalsVery hardProduct company interview · GATE level
R(A, B, C, D) with functional dependencies A → B, B → C and C → D is decomposed into R1(A, B), R2(B, C) and R3(A, D). Which statement about this decomposition is correct?
- A. It is lossless and dependency preserving
- B. It is lossless but not dependency preserving
- C. It is lossy but dependency preserving
- D. It is lossy and not dependency preserving
Correct answer: B. It is lossless but not dependency preserving
Lossless: R1 and R3 share A, and A is a key of both, so joining them gives (A, B, D) without spurious tuples; that result shares B with R2, and B → C makes B a key of R2, so the second join is lossless too. Dependency preservation: A → B is in R1 and B → C in R2, but C and D never appear together. R3 only carries A → D, and from A → B, B → C and A → D one cannot derive C → D (the closure of C is just {C}). So C → D can be checked only by joining, and the decomposition is not dependency preserving.
More DBMS and SQL questions
- R(A, B, C, D, E) has functional dependencies A → B, BC → D, D → AE and E → C. How many of the following dependencies are logically…
- A relation r(A, B, C, D) currently holds exactly these five tuples: (1, 2, 3, 4) (1, 2, 5, 6) (2, 2, 3, 4) (3, 4, 5, 4) (3, 4, 3, 6) How…
- Consider the schedule R2(A); R3(B); W1(A); R2(C); W1(C); W2(B); R4(A); W4(C). Which statement is correct?
- Consider the schedule R1(A); W2(A); W2(B); W1(A); W1(B); W3(A); W3(B). Which statement is correct?
- T1 executes R1(A); W1(A); R1(B) and T2 executes R2(B); W2(B); R2(A). Of the 20 possible interleavings of these two transactions (including…
- No transaction has committed yet in the schedule W1(A); R2(A); W2(B); R3(B); W4(B); R5(B). T1 now aborts. Besides T1, which transactions…