I’m trying to understand the steps and conditions for using the synthesis algorithm to determine candidate keys and check the normal forms (1NF, 2NF, 3NF, BCNF) of a database schema. Here’s what I have so far:
When I get a relation and its functional dependencies I can determine the candidate keys.
R = {A, B, C, D, E}; F = {ACD -> E, D -> E, AE -> BD, ABDE -> C, D -> ABC}
The candidate keys will be Sk = {D, AE}. Ss will stand for the superkeys.
Now to the part I dont get. How can I determine the normal form of the given relation. My professor gave us a short example but I didn´t get it right.
I think we can´t determine if the relation is in 1 NF or not by the given information, so we assume that it is in 1NF.
Next we will check for the 2 NF. The functional dependencies are in the form X -> Y:
If Y ∈ Sk and X ⊄ Sk is false for all functional dependencies, than the relation is in the second nf.
To check for the third nf X has to be an elemente of the set of superkeys or Y ∈ Sk. One of these conditions must be true for each functional dependency.
If X is for all functional dependencies an element of the set of superkeys, the relation is in BCNF.
I did it like this:
But something must be wrong with this algorithm, because AE -> BD can be split into AE->B and AE -> D. If we split it X ⊄ Sk would be true for AE -> D and therefore the relation wouldn´t be in 2 nf. Does anyone know what the problem is?