简体   繁体   English

这是有损联接和依赖性保留吗

[英]Is this Lossy Join and Dependency Preserving

I am reading this topic Functional dependency and Normalization in Database Management Subject. 我正在阅读数据库管理主题中的功能依赖和规范化主题。 I came across this example. 我遇到了这个例子。

Relation R(A,B,C,D) Which one is Lossy join but Dependency Preserving BCNF Decomposition? 关系R(A,B,C,D)有损连接但保留BCNF分解的依赖关系是哪一个?

a. A ->B, B -> CD

b. A -> B, B -> C, C->D

c. AB -> C, C -> AD

d. A -> BCD

Now answer given is option C. 现在给出的答案是option C.

How can option C. be a lossy decomposition . 选项C.如何成为有损分解 if you do ABC union CAD = ABCD This satisfies first condition. 如果您做ABC union CAD = ABCD这满足第一个条件。 if we do ABC intersection CAD = AC which is perfectly fine, since in AC, C is key for (CAD) C -> AD decomposition . 如果我们做ABC intersection CAD = AC ,那是非常好的, since in AC, C is key for (CAD) C -> AD decomposition which also satisfies the second condition. 这也满足第二个条件。 Am i making any mistake in understanding this concept. 我在理解这个概念上犯了任何错误吗?

Usually for a Normalisation/decomposition exercise, you are given: 通常,对于规范化/分解练习,将获得:

The full relation and its attributes. 完整关系及其属性。 [yes: R(A, B, C, D)] [是:R(A,B,C,D)]

The Functional dependencies. 功能依赖性。 [yes? [是? it looks like a., b., c., d. 它看起来像a。,b。,c。,d。 are possible sets of Fun Deps.] 是可能的趣味游戏集。]

The proposed decomposition. 建议分解。 [Often named R1, R2, etc. I don't see those. [通常命名为R1,R2等。我看不到那些。 I can't interpret option d. 我无法解释选项d。 to be proposing a decomposition.] 提出分解。]

Perhaps your post has missed out part of the exercise? 也许您的帖子错过了部分练习? Perhaps the exercise wants you to decide which decomp preserves the dependencies in BCNF? 也许练习希望您决定哪个解压缩保留BCNF中的依赖项? (But results in a lossy join.) (但会导致有损加入。)

[editted in response to Nikhil's comment] Note that the list of FD's alone doesn't amount to a decomposition: the FD C -> AD is short-hand for C -> A, C -> D. Does that mean two decomposing relations? [针对尼克尔的评论进行编辑]请注意,仅FD的列表并不构成分解:FD C-> AD是C-> A,C-> D的简写。这是否意味着两个分解关系? No, because A and C are already in the FD AB -> C. So we have R1= (A, B, C), R2 = (C, D). 不,因为A和C已经在FD AB中->C。所以我们有R1 =(A,B,C),R2 =(C,D)。 But I don't know if that is what the exercise is asking. 但是我不知道这是练习所要问的。 Think about it. 想一想。 What does option d. 选项d是什么? mean in terms of decompositions? 是指分解?

Perhaps the exercise is asking (for example): given a proposed decomposition into R1 = (A, B) and R2 = (B, C, D), which of the sets of FD's would give a lossy decomposition? 也许练习是在问(例如):给定一个建议分解为R1 =(A,B)和R2 =(B,C,D),哪一组FD将产生有损分解?

There's a worked example here: http://en.wikipedia.org/wiki/Lossless-Join_Decomposition . 这里有一个可行的示例: http : //en.wikipedia.org/wiki/Lossless-Join_Decomposition

It points to a previous q Lossless Join Property . 它指向先前的q 无损加入属性

And there's further references. 还有更多参考。

By the way, options a., b., include the same Fun Deps as option d., by the transitivity of dependencies (Armstrong's Axioms http://en.wikipedia.org/wiki/Armstrong%27s_axioms see also http://en.wikipedia.org/wiki/Heath%27s_theorem ). 顺便说一下,通过依赖性的传递,选项a。,b。包含与选项d。相同的Fun Deps(Armstrong的公理http://en.wikipedia.org/wiki/Armstrong%27s_axioms,另请参见http:// zh.wikipedia.org/wiki/Heath%27s_theorem )。 This is a clue. 这是一个线索。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM