如果表只有1个主键,默认情况下数据库是2NF是真的吗? [英] Is it true that a database is 2NF by default if the table only has 1 primary key?

查看:123
本文介绍了如果表只有1个主键,默认情况下数据库是2NF是真的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即有一个表只有一个主键(没有复合键)。默认是2NF?假设它已经是1NF

解决方案

我想现在有了。



<在我的例子中,如果有一个以上的医生,那么医生也部分依赖于病人号码,因为医生必须看到正确的病人。这只是混乱,因为医生也通过appNo过渡依赖patNo。


i.e. there is a table with only 1 primary key (no composite keys). Is it 2NF by default? Assume that it is already 1NF

解决方案

I think got it now.

In my example if there is more than 1 doctor, then doctor is also partially dependent on the patient number because the doctor has to see the correct patient. It's just confusing because doctor is also transitively dependent to patNo via appNo.

这篇关于如果表只有1个主键,默认情况下数据库是2NF是真的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆