CS FundamentalsVery hardGATE
A relation R(A, B, C, D) decomposes into R1(A, B) and R2(A, C, D). For this decomposition to be DEPENDENCY PRESERVING, what must hold?
- A. R1 and R2 must have no attributes in common at all
- B. Every functional dependency in the original set (or one logically implied by it) must be verifiable using only the attributes within a single one of R1 or R2 (i.e. the union of the FDs implied within each piece, plus any FDs across the split via shared attributes, must imply every original FD)
- C. The decomposition must always be lossless as well, with no separate condition needed
- D. Dependency preservation is automatic for any binary decomposition
Correct answer: B. Every functional dependency in the original set (or one logically implied by it) must be verifiable using only the attributes within a single one of R1 or R2 (i.e. the union of the FDs implied within each piece, plus any FDs across the split via shared attributes, must imply every original FD)
Dependency preservation means you can check every one of the original FDs without needing to join R1 and R2 back together — each original FD (or something that implies it) must be derivable purely from the FDs that 'fit inside' R1 alone or R2 alone. This is a separate property from losslessness: a decomposition can be lossless but fail to preserve dependencies (a classic BCNF decomposition trade-off), or vice versa.
More DBMS and SQL questions
- Decomposing R(A, B, C) with FDs A → B and B → C into BCNF can require R1(A, B) and R2(B, C). Is this decomposition dependency-preserving?
- 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…
- A relation R(A, B, C, D) has only the FD A → B (C and D are independent, part of the key). Decomposing R into R1(A, C) and R2(B, D) — is…
- A SERIALIZABLE transaction in PostgreSQL (which uses Serializable Snapshot Isolation, SSI) can occasionally abort with a serialization…
- A table has a UNIQUE constraint on (email) and a separate UNIQUE constraint on (phone). An application inserts a row where email already…
- A column is declared NOT NULL DEFAULT 0. An application performs INSERT INTO T (othercol) VALUES (5); without mentioning this column at…