ISRO | ISRO CS 2014 | Question 22

Consider the schema R(A, B, C, D) and the functional dependencies A->B and C->D. If the decomposition is made as R1(A,B) and R2(C,D), then which of the following is TRUE?
(A) Preserves dependency but cannot perform lossless join
(B) Preserves dependency and performs lossless join
(C) Does not perform dependency and cannot perform lossless join
(D) Does not preserve dependency but perform lossless join

Explanation:

```schema: R(A, B, C, D)
functional dependencies: A->B and C->D
Decomposed Schema:  R1(A,B) and R2(C,D)```

Check for dependency preserving:
A decomposition is said to be dependency preserving if F+ = (F1 âˆª F2 âˆª .. Fn)+,where F+ = total functional dependencies(FDs) on universal relation R, and F1 = set of FDs of R1, F2 = set of FDs of R2 and so on.

```R1(A,B)
A->B is covered
R2(C,D)
C->D is covered.```

Both the functional dependencies are covered, so FD preserving.

Check for lossless join:
Decomposition of R into R1 and R2 is a lossless-join decomposition if at least one of the following functional dependencies are in F+

``` R1 âˆ© R2 -> R1
R1 âˆ© R2 -> R2 ```

Here, R1(A,B) âˆ© R2(C,D) = null
So, it can not perform a lossless join.

Option (A) is correct.

Quiz of this Question

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Previous
Next