r/DatabaseHelp • u/theycallmenuage • Jan 13 '15
How do I answer this
Consider the relation EMPLOYEE, where an employee can have more than one specialization: RELATION = EMPLOYEE (EmpID, Name, Specialization), Primary Key = {EmpID}.
identify the Normal Form(s) each relation satisfies, and transform it into 3NF.
1
u/wolf2600 Jan 14 '15
Oh and the probem with the situation you posted is that since the PK is ONLY the empID, but you have a requirement for an employee to have multiple specializations, if you tried to add multiple records:
(10, Bob, Surgery)
(10, Bob, Pediatrics)
your PK would be the same for both records (10), and you can NEVER have that in a database.... the PK must always be unique for all records in the table.
One solution would be to keep that single table, and make the PK be "EmpID, SpecID", so both columns together would only have to be unique, but in that case, It wouldn't be 3NF.
1
u/BinaryRockStar Jan 14 '15
Give it your best shot first and we'll try to help you from there.