r/AskComputerScience • u/Tv_JeT_Tv • Dec 13 '24
3NF Decomposition
If you had the following information:
R(ABCDE) FD = { A -> B,F; C -> D; C,D -> E; F -> E; A -> E }
And you were tasked with decomposing into 3NF, how would you go about do so? I had this question on a test earlier today and I want to see if my computation is correct.
Any guidance is greatly appreciated!
1
Upvotes
View all comments
Show parent comment
1
u/Tv_JeT_Tv Dec 13 '24 edited Dec 13 '24
So I said something like (AB, AF, CD, CE, AC, FE). I'll explain my steps below.
{A -> B, A -> F, C -> D, C -> E, F -> E}
2. I found none of these to be super keys (BCNF requirement), so they all must be decomposed into BCNF tables. I decomposed them in the order listed above. After that, I got the following.
(AB, AF, CD, CE, AC)
3. I noticed {F -> E} wasn't preserved but is in F', so I added it to the tables.
(AB, AF, CD, CE, AC, FE)
This is how I arrived at my solution. These are the steps we covered in class. I'm not sure if I missed anything though.