关系数据库设计中的函数依赖问题

发布于 2024-10-03 20:35:52 字数 149 浏览 0 评论 0原文

如果我对关系模式 r(A, B, C, D, E, F) 有一组 F 函数依赖关系:

A --> BCD

BC --> DE

B--> D

D--> A

B+ 会是什么?

If I have a set F of functional dependencies on the relation schema r(A, B, C, D, E, F):

A --> BCD

BC --> DE

B --> D

D --> A

What would B+ be??

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

ま柒月 2024-10-10 20:35:52

我认为B+表示B的关闭

I think B+ denotes the closure of B

挽容 2024-10-10 20:35:52

“我认为 B+ 表示 B 的闭包”

这通常是在某物上附加加号的预期含义,但是,在函数依赖和规范化理论的背景下,“某物”必须指代函数的集合依赖关系。

B+(其中 B 是属性之一)根据我所知道的任何惯例仍然毫无意义。

因此,为了回答 OP 可能想问的问题,如果我们将 S 称为给定的 FD 集合 {A->BCD D->A ...},那么 S+ 是另一组 FD,其中包括所有 FD可以从给定的集合中派生出来,并用所有琐碎的依赖关系进行扩充,例如 A->A。

例如,从A→BCD和A→A,我们可以推断出A→ABCD。从D→A和A→BCD我们可以推断出D→BCD。这些推断的 FD 是 S+ 的成员,但不是 S 的成员。

(PS,这组通常不是特别有用,除非在系统内部对 FD 集进行计算,例如用于关键确定的自动算法)

"I think B+ denotes the closure of B"

That is usually the intended meaning of appending a plus sign to something, however that "something", in the context of functional dependencies and normalization theory, must refer to the set of functional dependencies.

B+, where B is one of the attributes, still is meaningless by any convention I know of.

So, to answer the question that OP presumably intended to ask, if we call S his given set of FDs {A->BCD D->A ...}, then S+ is another set of FDs, which includes ALL FDs that can possibly be derived from the given set, augmented with all trivial dependencies such as A->A.

For example, from A->BCD and A->A, we can infer A->ABCD. From D->A and A->BCD we can infer D->BCD. Those inferred FDs are member of S+, but not of S.

(PS this set is usually not particularly useful, unless internally in systems that do computations on sets of FDs, such as perhaps automated algorithms for key determination)

飘逸的'云 2024-10-10 20:35:52
B+ denotes closure of B.
B --> D          B+ = {BD}
D --> A          B+ = {ABD}
A --> BCD        B+ = {ABCD}
BC --> DE        B+ = {ABCDE}

B 可以找到该关系的所有属性。

因此,B 是该关系的主键。

B+ denotes closure of B.
B --> D          B+ = {BD}
D --> A          B+ = {ABD}
A --> BCD        B+ = {ABCD}
BC --> DE        B+ = {ABCDE}

All the attributes of the relation can be found by B.

So, B is the primary key of the relation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文