Pregunta

This is for a Database Project that i am working on and i am confused on the parts to do with the 3NF and the BCNF, i understand them somehow but cannot apply them to my own relations and was hoping that if it is answered for me and then i can continue the rest of the relations on my own.

Staff:(SID, Fname, MI, Lname, Position, Shift, Phone_number, DoB, DoE, Gender, Apt_Number, City, Zip_code)

FD1 : (SID) --> (Fname, MI, Lname, Position, Shift, Phone_number, DoB, DoE, Gender, Apt_Number, City, Zip_code);

FD2 : (Fname, MI, Lname, DoB) --> (SID, Position, Shift, Phone_number, DoE, Gender, Apt_Number, City, Zip_code)

FD3 : (Zip_code) --> (City)

Thank you.

¿Fue útil?

Solución

OK its simple enough and i understand it. since in FD3, Zip_code is not a primary key and cities can have more than one Zip_code then it is not in the 3NF and must be decomposed. make another table called Zip_Locations: {Zip_code(Primary Key), City}.Zip_Locations only has one FD and its a non-primary that depends on a candidate or primary key, so it satisfies 3NF automatically. Staff will look like this Staff:(SID, Fname, MI, Lname, Position, Shift, Phone_number, DoB, DoE, Gender, Apt_Number, Zip_code) and afterwards i can safely say that the relations are in BCNF because all non-prime keys depend strictly on candidate keys. plus if there is only one primary key in a relation and it already satisfies the 3NF then it automatically satisfies the BCNF.

This website helped alot, http://www.tomjewett.com/dbdesign/dbdesign.php?page=subkeys.php

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top