该表是1NF还是2NF?

问题描述 投票:0回答:1

假设我有一个关系表:

FinalYearProject(主管,研究主题,咨询日,学生)

以及以下功能依赖性:

    student -> researchTopic
    student, researchTopic -> supervisor
    researchTopic,supervisor -> consultationDay 

[从那里我确定了我的最小超键是:student,其中

student -> researchTopic,supervisor, consultationDay

我说有部分依赖项是正确的,因为主管并不基于功能依赖项仅依赖于学生

student, researchTopic -> supervisor

任何帮助将不胜感激。

relational-database normalization database-normalization functional-dependencies
1个回答
0
投票

由于学生是候选人的关键,上级取决于它。

[实际上,考虑到给定student -> researchTopic,研究主题取决于学生:因此在依存关系student, researchTopic -> supervisor中,属性researchTopic是多余的(依赖度student -> supervisor成立)。使用Armstrong的公理很容易证明这一点。

所以关系在2NF中。

© www.soinside.com 2019 - 2024. All rights reserved.