gpt4 book ai didi

mysql - 掌握 3NF - 这是 3nf 数据库的指标吗?

转载 作者:行者123 更新时间:2023-11-29 10:55:39 34 4
gpt4 key购买 nike

因此,根据我的理解,在 3nf 数据库中,主键值可用于确定表中的每个其他属性。

  1. 这是否意味着外键将专门用于创建复合实体?外键如何适合 3nf 数据库?

有哪些“迹象”表明我的数据库已标准化?数据库中的某些表是否可以标准化,而其他表则不能?

最佳答案

So, from my understanding, in a 3nf database, the primary key value can be used to determine every single other attribute in the table.

不是真的。对于所有正常形式来说都是如此。如果表属于 2NF 并且不存在传递依赖关系,则该表属于 3NF。严格来说,范式指的是单个表,而不是数据库。

Does this mean foreign keys will exclusively be used to create composite entities? How do foreign keys fit in a 3nf database?

没有。您可以以任何有意义的方式混合外键引用和离散值。或者以毫无意义的方式。

What are some 'signs' that my database is normalised?

“符号”只是各种范式的定义。你想知道我的表“Users”是否在3NF中?将 3NF 的定义应用到它上面。如果满足所有条件,则属于 3NF。

Can some tables in a database be normalised, while others are not?

由于范式(1NF、2NF、3NF 等)是表的特征,因此数据库可能由范式的每种可能组合的表组成。您可能有一些表在 2NF 中,一些在 3NF 中,一些在 BCNF 中,一些在 6NF 中。

关于mysql - 掌握 3NF - 这是 3nf 数据库的指标吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43069594/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com