How do I get this mysql database in better 1NF or 2NF form?
I tried my best to rem开发者_开发百科ove redundant data. It appears there is redundant data still in "Prof_Dept"
The schema looks strange. How can a Department by a child of Professor_Dept (with the Professor_DeptID FK in it)? That means there is no "Science faculty". You would be storing
professor john's science department
professor john's physics department
professor tom's physics department
etc
I think the tables should be
Professor
Department
<bridge between the two> (Professor_Dept)
Course
(this hangs off the bridge table, since the combination
defines the Course instructor [professor] and department)
Professor: id, name, e.g. "John"
Department: id, name, e.g. "COM"
Professor_Dept: id, professor_id (FK), department_id (FK), modified_date
Course: Professor_Dept_id (FK), number, course_modified
From a course, you already know through the FK which professor and dept it relates to.
精彩评论