谁能用适当的例子向我解释 1NF、2NF、3NF、BCNF 规则?
这是一个常见的面试问题。我遇到过一次面试,面试官给了我一张桌子,让我告诉他这张桌子是哪种范式?如果它在##NF中,那么将其归一化到下一个NF?
我总是对这些正常形式的数据库感到困惑。 谁能向我解释这些范式,并举出每个 NF 如何建模到表中的正确示例,以便对我的下一次面试有所帮助?
This is a common interview question. I faced one interview where the interviewer gave me one table and asked me tell him which normal form the table is in? If it's in ##NF, then normalize it to the next NF?
I'm always get confused between these normal forms of database.
Can anyone explain to me these normal forms with a proper example of how each NF is modeled into table so it will help in my next interview?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
博伊斯·科德范式确实是最重要的,也是最容易解释的:每个非平凡的行列式都是一个超级键(只需记住“超级键中的箭头”)。次要范式仅值得一提,因为 BCNF 在少数情况下不保留依赖性。
Hugh Darwen 的 BCNF 和 5NF 示例:
有关更多数学定义(Abiteboul 等人):
Boyce Codd Normal Form is really the most important and also the easiest to explain: Every non-trivial determinant is a superkey (just remember "arrows out of superkeys"). The lesser normal forms are only worth mentioning because BCNF is not dependency-preserving in a few cases.
Examples of BCNF and 5NF by Hugh Darwen:
For more mathematical definitions (Abiteboul et al):