BCNF Decomposition?

北慕城南 提交于 2019-12-11 11:18:30

问题


Given relation R(A,B,C,D,E) and FDs = {A->BC, CD->E, B->D, E->A}
While converting R into BCNF:

ABCDE -> BD & ABCE will be first decomposition
BD is in BCNF

Regarding ABCE:

Opinion 1: ABCE has FDs: A->BCE, E->ABC, BC->AE
Therefore its already in BCNF

Opinion 2 ABCE has FDs: A->BC, E->ABC
Therefore needs to be decomposed into ABC & AE

I believe that first one should be correct because in second we are assuming that A->E and BC->E are not possible because D is not one of the attributes of the relation. But I am not sure about it.
Please tell whether in ABCE A->E and BC->E will hold or not?


回答1:


You have correctly identified the issue around which the problem revolves. That is, whether "BC->AE" indeed applies to ABCE or not. For it to apply to ABCE, it needs to be proved that it applies to the original, ABCDE. Can you prove that ? (Hint : start with B->D from the original and augment with the trivial C->C to obtain BC->CD).

Important discussion now follows. Please sit it out entirely.

Now take a step back and see what happened to the schema/design upon the first decomposition. That first decomposition singled out BD into its own table/schema. That left the existing FD "CD->E" inexpressible in any of the remaining tables/schemas (in ABCE because that one doesn't have D, in BD because that one doesn't have ACE). But the business rule that was expressed by this FD still applies. What this means is that in the replacing design (the one with BD singled out), there is an extra constraint to be defined across the two tables, and this constraint must have the same effect on the combination of the two tables (their JOIN, that is) as the FD had on the original single-table design. That is, that constraint must enforce that in any JOIN of the two tables, it will never be the case that the same CD value combination appears alongside distinct (>1) E values.

The replacing design without the additional constraint, would never be perfectly equivalent to the original design with the FD included. But because the two designs are indeed supposed to be equivalent, you should be allowed to assume that this additional constraint is indeed in place (and the corresponding FD still "applies to the JOIN"). Pls note that I have personally never seen or heard that being stated explicitly. Treatments of normalization theory tend to overlook additional constraints, even if they are equivalent to an FD that was given earlier on.

If you could not make that assumption, and you are forced to look only at what the remaining FDs imply for the individual table they apply to, then there would be no way for you to prove that BC->AE holds in your ABCE table/schema. And you would be forced to conclude that option 2 is the correct answer.

(Important conclusion here.) Alas, there is also a lot of poor teaching around, and it is nowhere near certain that all normalization theory courses take the same stance on such issues. So although my conviction/opinion is that you were right, unfortunately my answer must be "it depends on how well your teacher understands normalization theory him/herself".



来源:https://stackoverflow.com/questions/30692318/bcnf-decomposition

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!