GATE / CS ARCHIVE

SIMILAR QUESTIONS / DATABASE MANAGEMENT SYSTEMS

Check FDs against equal-value row pairs

2 questions solved the same way, newest first. Back to Database Management Systems

How these are solved

For each proposed X→Y, compare all rows agreeing on X and reject on a differing Y. A sample instance can refute an FD but does not establish an unrestricted schema dependency.

2 marks · MCQ
Report issue

What a relation instance proves about dependencies

Functional Dependencies & Keys

Question 2.25, GATE 2002: An instance of R(A,B,C) lists rows (1,1,1), (1,1,0), (2,3,2), (2,3,2), including the repeated displayed row. What can be concluded?
(A) A functionally determines B, and B functionally determines C.
(B) A functionally determines B, and B does not functionally determine C.
(C) B does not functionally determine C.
(D) A does not functionally determine B, and B does not functionally determine C.
Question 2.25, GATE 2002: An instance of R(A,B,C) lists rows (1,1,1), (1,1,0), (2,3,2), (2,3,2), including the repeated displayed row. What can be concluded?
(A) A functionally determines B, and B functionally determines C.
(B) A functionally determines B, and B does not functionally determine C.
(C) B does not functionally determine C.
(D) A does not functionally determine B, and B does not functionally determine C.
Tap to enlarge
Your answer
Answer & solution

Answer: C for schema-level inference (no official key was published)

Step 1: Use a counterexample to distinguish failure from confirmation.

Step 2: The two rows(1,1,1) and(1,1,0) agree on B but disagree on C, immediately witnessing failure of B→C. No displayed pair violates A→B, but an additional legal row(1,2,0) would violate it unless a schema constraint forbids that row. Observing the current sample cannot establish that prohibition. This is why schema inference selects C while instance-only testing supports the stronger conjunction B.

Conclusion: The rows with B=1 have different C values 1 and 0, disproving B→C for any schema constraint meant to hold on all legal instances containing this one. The displayed rows do satisfy A→B, but a single positive example cannot establish that dependency for all legal instances. Therefore the guaranteed schema conclusion is C. If the question instead asks only which dependencies hold on this particular instance, B’s conjunction is true too. The duplicate(2,3,2) row does not affect either observation.

Original paper, page 6

2 marks · MCQ
Report issue

Dependencies holding on a displayed instance

Functional Dependencies & Keys

Question 2.24, GATE 2000: Rows(X,Y,Z) are(1,4,2),(1,5,3),(1,6,3),(3,2,2). Which pair holds: XY→Z and Z→Y; YZ→X and Y→Z; YZ→X and X→Z; XZ→Y and Y→X?
Question 2.24, GATE 2000: Rows(X,Y,Z) are(1,4,2),(1,5,3),(1,6,3),(3,2,2). Which pair holds: XY→Z and Z→Y; YZ→X and Y→Z; YZ→X and X→Z; XZ→Y and Y→X?
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Step 1: Every Y value in the four rows is distinct. Hence Y uniquely identifies the entire row in this instance, so Y→Z and Y→X hold. Adding Z to Y cannot destroy uniqueness, so YZ→X also holds.

Step 2: Z→Y fails because Z=2 occurs with Y=4 and 2. X→Z fails because X=1 occurs with Z=2 and 3. XZ→Y fails because(X,Z)=(1,3) occurs with Y=5 and 6.

Thus only the conjunction in B holds. These are instance-level observations, not an inference that the same FDs constrain every possible future instance.

Original paper, page 6