最佳答案
架构看起来很奇怪。 Professor_Dept 的子级(其中包含 Professor_DeptID FK)如何创建部门?这意味着没有“科学学院”。您将存储
professor john's science department
professor john's physics department
professor tom's physics department
etc
我认为表格应该是
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
从一门类(class)中,您已经通过 FK 知道它与哪位教授和部门相关。
关于mysql - 将数据库设置为 1NF 或 2NF - mysql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5372258/