gpt4 book ai didi

sql - 设计——第六范式

转载 作者:行者123 更新时间:2023-12-04 14:04:56 26 4
gpt4 key购买 nike

我有以下表格:

Blogs { BlogName }
BlogPosts { BlogName, PostTitle }

博客文章同时建模一个实体和一个关系,根据 6nf(根据第三个宣言)这是无效的。

在 6nf 中,它将是:
Blogs { BlogName }
Posts { PostTitle }
BlogPosts { BlogName, PostTitle}

如果我想按序列 nbr(只是一个例子)对博客文章进行排序,那将是另一个表
BlogPostsSorting { BlogName, PostTitle , SortOrder }

我说得对吗?

最佳答案

你的 table 的 key 是什么?根据列名,我猜BlogPosts 的键只能是{BlogName,PostTitle}。在这种情况下,BlogPosts 已经在 6NF 中——它没有非素数属性,因此不能进行非损失分解。 Blogs relvar 和 Posts relvar 将是多余的 - 您不需要它们。

Blog posts is modeling an entity and a relationship at the same time which is invalid according to 6nf (according to the third manifesto)



你能告诉我你认为第三宣言在哪里说这是无效的。我敢肯定它不会,但我想知道你是如何得出这样的结论的。

关于sql - 设计——第六范式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7540864/

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