关系数据库设计中的函数依赖问题
如果我对关系模式 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为B+表示B的关闭
I think B+ denotes the closure of B
“我认为 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)
B 可以找到该关系的所有属性。
因此,B 是该关系的主键。
All the attributes of the relation can be found by B.
So, B is the primary key of the relation.