A relation is decomposed when it is not in the desired normal form or when decomposition improves design by removing redundancy and update anomalies. A decomposition of a relation R into sub-relations R1, R2, ... must be checked for two important properties:
Let R be decomposed into R1 and R2. The decomposition is lossless if the natural join of R1 and R2 yields exactly R; otherwise it is lossy.
Using functional dependencies, a sufficient condition to ensure that a decomposition of R into R1 and R2 is lossless is:
Example: Let R(A, B, C, D) with FD set {A → BC}. Decompose into R1( A, B, C ) and R2( A, D ).
A decomposition D = {R1, R2, ..., Rn} of R is dependency preserving with respect to a set F of functional dependencies if the closure of the union of the projections of F onto each Ri is equal to F+. Formally, if Fi is the set of FDs that hold on Ri (projection of F onto Ri), then
(F1 ∪ F2 ∪ ... ∪ Fn)+ = F+.
Informally, every FD in F must be either present directly in some Ri or be inferable from the FDs that hold locally on the Ri without performing a join of the relations.
Example: Let R(A, B, C, D) and F = {A → B, C → D}. Decompose into R1( A, B ) and R2( C, D ).
GATE Question
Q. Consider a schema R(A,B,C,D) and functional dependencies A->B and C->D. Then the decomposition of R into R1(AB) and R2(CD) is [GATE-CS-2001]
(a) dependency preserving and lossless join
(b) lossless join but not dependency preserving
(c) dependency preserving but not lossless join
(d) not dependency preserving and not lossless join
Ans: (c)
Solution: For lossless join decomposition, these three conditions must hold true:
Hence the decomposition is not lossless.
For dependency preserving decomposition, A → B is ensured in R1(AB) and C → D is ensured in R2(CD). Hence it is dependency preserving decomposition.
So, the correct option is C.
Given R and F, the projection (or restriction) of F onto a sub-schema S (a subset of attributes of R) is the set of all functional dependencies X → Y such that X and Y are subsets of S and X → Y is implied by F. The decomposition is dependency preserving if the union of these projections implies F (i.e., no original FD is lost).
Problem: Let R(A, B, C, D) and F = { AB → C, C → D, D → A }. Decompose R into R1(A, B, C) and R2(C, D). Check whether the decomposition is dependency preserving.
Solution:
Compute projection of F on R1 (attributes A,B,C):
C is in R1 and A is in R1, and C → D and D → A imply C → A (since C → D and D → A gives C → A by transitivity).
Therefore R1 yields the following FDs (implied by F and restricted to R1):
Compute projection of F on R2 (attributes C,D):
Now consider the original set F = { AB → C, C → D, D → A }.
Check whether each FD in F is present or implied by F1 ∪ F2:
Therefore F1 ∪ F2 does not imply D → A; the decomposition is not dependency preserving.
A functional dependency X → Y holds in a relation R if for any two tuples t1 and t2 in R, whenever t1[X] = t2[X] then t1[Y] = t2[Y]. That is, X functionally determines Y.
Examples from an EMPLOYEE relation:
Table 1The FD set for the EMPLOYEE relation in the example is:
{ E-ID → E-NAME, E-ID → E-CITY, E-ID → E-STATE, E-CITY → E-STATE }
A functional dependency X → Y is trivial if Y ⊆ X; such dependencies always hold. Otherwise the FD is non-trivial.
Example: {E-ID, E-NAME} → E-ID is trivial because the right side is contained in the left side. E-ID → E-NAME is non-trivial.
Procedure to compute X+ given FD set F:
Example: For R(E-ID, E-NAME, E-CITY, E-STATE) with F = { E-ID → E-NAME, E-ID → E-CITY, E-ID → E-STATE, E-CITY → E-STATE }:
Compute (E-ID)+ :
Add E-ID to the set: {E-ID}.
From E-ID → E-NAME, add E-NAME: {E-ID, E-NAME}.
From E-ID → E-CITY, add E-CITY: {E-ID, E-NAME, E-CITY}.
From E-ID → E-STATE (or from E-CITY → E-STATE once E-CITY is present), add E-STATE: {E-ID, E-NAME, E-CITY, E-STATE}.
Thus (E-ID)+ = {E-ID, E-NAME, E-CITY, E-STATE}.
Similarly (E-NAME)+ = {E-NAME}, and (E-CITY)+ = {E-CITY, E-STATE}.

Worked exercise: Given R(ABCDE) with F = { AB → C, B → D, C → E, D → A }, compute closures such as (B)+ and (C,D)+.
Superkey: Any set of attributes that functionally determines all attributes of the relation.
Candidate key: A minimal superkey - a superkey such that no proper subset is also a superkey.
Example: In the EMPLOYEE relation, E-ID is a candidate key because (E-ID)+ includes all attributes and no proper subset determines all attributes. Sets such as (E-ID, E-NAME) are superkeys but not candidate keys because they are not minimal.
Note: Every candidate key is a superkey, but not every superkey is a candidate key.
Summary
Lossless join ensures exact recoverability of the original relation from its decomposed parts. Dependency preserving decomposition ensures that all functional dependencies of the original relation can be enforced without expensive joins. Use attribute closure and FD projection to test these properties; when designing schemas aim for decompositions that satisfy both properties to maintain correctness and efficient constraint enforcement.
| 1. What is lossless decomposition? | ![]() |
| 2. Why is lossless decomposition important in database design? | ![]() |
| 3. How does lossless decomposition differ from lossy decomposition? | ![]() |
| 4. What are the advantages of lossless decomposition? | ![]() |
| 5. Can lossless decomposition be applied to any relation? | ![]() |
![]() | Explore Courses for Computer Science Engineering (CSE) exam |
![]() | Get EduRev Notes directly in your Google search |