做考古题遇到一题做出来与书本解答不一样的题目
希望能帮我看看是否解答有错,或我的作法有问题,谢谢
[题目]
员工任务关联为(EID, EName, DID, JobID, JName, Title, Salary)
函数相依如下
EID -> {EName, DID, JobID}
JobID -> JName
{EID, Title} -> Salary
(一)员工任务的主键为何?
(二)请将员工任务分解成满足3NF的关联纲目
[我的解答]
(一)主键为{EID, Title}
(二)分解为
R1(EID, Title, Salary) {EID, Title}为主键
R2(JobID, JName) {JobID}为主键
R3(EID, EName, DID, JobID) {EID}为主键
[书本解答]
(一)主键为{EID, JobID}
(二)分解为
R1(EID, EName, DID) {EID}为主键
R2(JobID, JName) {JobID}为主键
R3(EID, Title) {EID}为主键
R4(Title Salary) {Title}为主键