简体   繁体   English

分解表时的依存关系

[英]Dependency Preserving in decomposition of tables

I am confused with dependency preserving property of database relations (tables). 我对数据库关系(表)的依赖项保留属性感到困惑。 Do we have to look at initial FD set or what else? 我们是否必须查看初始FD集还是其他? I tried to solve some problems on this subject. 我试图解决这个问题。 The questions before this one all feed my initial estimation, which is 'look at the given FD set. 在此之前的所有问题都满足了我的最初估计,即“查看给定的FD集”。 If you don't lose any of them in your new relation set, then this is dependency preserving'. 如果您没有在新的关系集中丢失任何一个,那么这就是保持依赖关系。

But when I come to this question I am confused. 但是,当我提到这个问题时,我很困惑。

Consider the relation R = (ABCDEFGH) and the following FD set: 考虑关系R =(ABCDEFGH)和以下FD集:

  • FD1 E -› D FD1 E-› D
  • FD2 B, E -› CG FD2 B,E-› CG
  • FD3 D, G -› E FD3 D,G-› E
  • FD4 C -› AB FD4 C-› AB
  • FD5 E, G -› C FD5 E,G-› C
  • FD6 A, E -› BD FD6 A,E-› BD
  • FD7 C, E, D -› G FD7 C,E,D-› G
  • FD8 A, G -› E FD8 A,G-› E

These are the given relations 这些是给定的关系

  • R1 (EFGH) R1(EFGH)
  • R2 (ABEG) R2(ABEG)
  • R3 (CDEG) R3(CDEG)
  • R4 (ABC) R4(ABC)

Answer says that this decomposition is dependency preserving. 回答说,这种分解是依赖关系的保留。 According to my estimation we lose FD2 so, this must not be dependency preserving. 根据我的估计,我们丢失了FD2,因此,它一定不能保留依赖项。

I need an expert to clarify this concept for me. 我需要专家为我澄清这个概念。

This question was a part of homework questions. 这个问题是家庭作业问题的一部分。 I wasn't sure if I am thinking right when I do the homework. 我不确定做作业时是否在考虑正确。

In my answer I wrote: This decomposition is not dependency preserving because in this decomposition we loose the FD DF--> BC . 在我的回答中,我写道:此分解不是保留依赖项,因为在此分解中,我们松开了FD DF-> BC。

And my database teacher accepted this answer as an right answer I wanted to clearify the subject here also. 我的数据库老师认为这个答案是正确的答案,我也想在这里澄清这个问题。

Ferda 费尔达

The decomposition is dependency preserving as FD2 BE->CG can be achieved by relations R2(BE->G) and R3(EG->C). 分解是保持依赖关系,因为可以通过关系R2(BE-> G)和R3(EG-> C)实现FD2 BE-> CG。 Closure of BE gives CG. BE的关闭给出CG。

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

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