Skip to content
Sahithyan's S3
1
Sahithyan's S3 — Database Systems

Decomposition

The process of breaking down a large table into smaller, more manageable tables based on functional dependencies. Helps reduce redundancy and improve data integrity. But not always good or required.

Occurs when a table is decomposed into smaller tables, but some information is lost in the process. This can happen if the decomposition does not preserve all functional dependencies.

Ensures that all functional dependencies are preserved during the decomposition process. This is achieved by ensuring that each functional dependency is preserved in at least one of the resulting tables. Preferred type.

A decomposition of RR into R1R_1 and R2R_2 is lossless join if at least one of the following dependencies is in F+F^+:

  • R1R2R1R_1 \cap R_2 \rightarrow R_1
  • R1R2R2R_1 \cap R_2 \rightarrow R_2

Suppose a relation RR (satisfying FF) is decomposed into R1,R2,,RnR_1, R_2, \ldots, R_n. Let FiF_i be the set of functional dependencies which include only attributes in RiR_i.

The decomposition is dependency preserving if:

(F1F2Fn)+=F+(F_1 \cup F_2 \cup \ldots F_n)*+ = F^+

Means that all the functional dependencies from the original relation can still be enforced by checking them locally on the decomposed relations, without having to recombine (join) the tables.

If not, checking for violation of functional dependencies will require recombining the tables, which is expensive.

To check if a dependency αβ\alpha \rightarrow \beta is preserved in a decomposition:

  • Start with result=α\text{result} = \alpha
  • For each RiR_i in the decomposition:
    • t=(resultRi)+Rit = (\text{result} \cap R_i)^+ \cap R_i
    • result=resultt\text{result} = \text{result} \cup t
  • If resultβ\text{result} \supseteq \beta, then αβ\alpha \rightarrow \beta is preserved.

Here, attribute closure is computed with respect to FF.

The above test is applied on all functional dependencies in FF. Takes polynomial time.