Irreducible set of FD
Irreducible set of
Functional Dependency
In an irreducible set of functional dependency, we
try to reduce all the transactions to reduce waste of the set of attributes.
Steps to decompose the set of
attributes and make it irreducible are as follows:
Step-1: In the given functional dependency, decompose
all possible right-hand side attributes and keep left-hand side attributes as
it is.
Step-2: Now, find closure of all the transactions(decomposed functional
dependencies) by including and excluding the same transaction.
Step-3: Compare the results obtained in closure set of the attribute after
including and excluding the same transaction, if the closure of that
transaction is the same for both included and excluded transactions then ignore
the transaction else that transaction needs to be considered.
For eg.
Consider the relation R(w,x,y,z) with following
functional dependencies and reduce them to irreducible set of attributes.
x -> w
wz - > xy
y - > wxz
Firstly, decompose all the transactions:
x ->
w wz -> x wz -> y
y -> w y -> x y
-> z
Now, find closure of all the decomposed transactions:
1) x -> w
- Including the transaction
{x}+={x,w} - Excluding the transaction
{x}+={x}
As, closure are different in both cases so we cannot ignore this
transaction.
2) wz -> x
- Including the transaction
{wz}+={x,y,w,z} - Excluding the transaction
{wz}+={w,x,y,z}
Closure is same in both cases so, we can ignore this transaction.
3) wz -> y
- Including the transaction
{wz}+={x,y,w,z} - Excluding the transaction
{wz}+={w,z}
Closure is different in both cases so, we cannot ignore this
transaction.
4) y -> w
- Including the transaction
{y}+={x,y,w,z} - Excluding the transaction
{y}+={w,x,y,z}
Closure are same in both cases so we ignore this transaction.
5) y -> x
- Including the transaction
{y}+={x,y,w,z} - Excluding the transaction
{y}+={y,z}
Closure are different in both cases so we cannot ignore this
transaction.
6) y -> z
- Including the transaction
{y}+={x,y,w,z} - Excluding the transaction
{y}+={w,x,y}
Closure are different in both cases so we cannot ignore this
transaction.
Now, we willl write all the transactions which
cannot be ignored:
x -> w
wz -> y
y -> x
y -> z
This functional dependencies are now irreducible.
Comments
Post a Comment