Question: Consider a relation schema R = (A, B, C, D, E) and a set F consisting of the following functional dependencies that hold on R:
Consider a relation schema R = (A, B, C, D, E) and a set F consisting of the following functional dependencies that hold on R:
A -> C, AC -> E, AD -> B, B -> ADE, D-> E.
An algorithm for computing a lossless-join decomposition of a relation schema (under a set of functional dependencies that hold on the schema) into a set of Boyce-Codd normal form (BCNF) relation schemas is given below. Essentially, this algorithm just replaces any schema that is not in BCNF because of a non-trivial functional dependency X -> Y in which X is not a superkey of the schema (where X and Y are sets of attributes) with two new schemas, (X, Y) and Ri - Y, where Ri is the schema replaced. Use this algorithm to decompose R under F.

result R) done:= false; compute F while (not done) do if (there is a schema R, in result that is not in BCNF) then begin let a ? ? be a nontrivial functional dependency that holds on R, such that ? Ri is not in F+, and ? n ? 0; result :-(result-Ri) U (R-?) U ( ?, ?); end else done := true; result R) done:= false; compute F while (not done) do if (there is a schema R, in result that is not in BCNF) then begin let a ? ? be a nontrivial functional dependency that holds on R, such that ? Ri is not in F+, and ? n ? 0; result :-(result-Ri) U (R-?) U ( ?, ?); end else done := true
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
