Write programs that implement Algorithms 1 and 2.
Algorithm 1
Relational Decomposition into BCNF with Nonadditive Join Property
Input: A universal relation R and a set of functional dependencies F on the attributes of R.
1. Set D:= {R} ;
2. While there is a relation schema Q in D that is not in BCNF do
{
choose a relation schema Q in D that is not in BCNF; find a functional dependency X→Y in Q that violates BCNF; replace Q in D by two relation schemas (Q– Y) and (X⋃ Y);
} ;
Algorithm 2
Relational Synthesis into 3NF with Dependency Preservation and Nonadditive Join Property
Input: A universal relation R and a set of functional dependencies F on the attributes of R.
1. Find a minimal cover G for F(use Algorithm 16.2).
2. For each left-hand-side X of a functional dependency that appears in G, create a relation schema in D with attributes {X⋃ {A1} ⋃ {A2} ... ⋃ {Ak} }, where X→A1, X→A2, ..., X→Ak are the only dependencies in G with X as left-hand-side (X is the key of this relation).
3. If none of the relation schemas in D contains a key of R, then create one more relation schema in D that contains attributes that form a key of R.7(Algorithm 16.2(a) may be used to find a key.)
4. Eliminate redundant relations from the resulting set of relations in the relational database schema. A relation R is considered redundant if R is a projection of another relation S in the schema; alternately, R is subsumed by S.8
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.