A functional decomposition is the process of breaking down the functions of an organization into progressively greater (finer and finer) levels of detail.
In decomposition, one function is described in greater detail by a set of other supporting functions.
The decomposition of a relation scheme R consists of replacing the relation schema by two or more relation schemas that each contain a subset of the attributes of R and together include all attributes in R.
Decomposition helps in eliminating some of the problems of bad design such as redundancy, inconsistencies and anomalies.
There are two types of decomposition :
This relation is decomposed into two relation no_name and name_dept :
No_name: Name_dept :
In lossy decomposition ,spurious tuples are generated when a natural join is applied to the relations in the decomposition.
The above decomposition is a bad decomposition or Lossy decomposition.
"The decompositio of relation R into R1 and R2 is lossless when the join of R1 and R2 yield the same relation as in R."
A relational table is decomposed (or factored) into two or more smaller tables, in such a way that the designer can capture the precise content of the original table by joining the decomposed parts. This is called lossless-join (or non-additive join) decomposition.
This is also refferd as non-additive decomposition.
The lossless-join decomposition is always defined with respect to a specific set F of dependencies.
Consider that we have table STUDENT with three attribute roll_no , sname and department.
This relation is decomposed into two relation Stu_name and Stu_dept :
Stu_name: Stu_dept :
Now ,when these two relations are joined on the comman column 'roll_no' ,the resultant relation will look like stu_joined.
In lossless decomposition, no any spurious tuples are generated when a natural joined is applied to the relations in the decomposition.
Can u plz give more exapmles of lossy decomposition.? what is dependency preservation property in dbms?
Is there should be any one decomposition, which satisfies lossless dependency?