7.5.1.1 Testing for BCNF
Testing of a relation to see if it satisfies BCNF can be simplified in some cases:
-To check if a nontrivial dependency a->b causes a violation of BCNF, compute a+(the attribute closure of a), and verify that it includes all attributes of R; that is, it is a superkey of R.
-To check if a relation schema R is in BCNF, it suffices to check only the dependencies in the given set F for violation of BCNF, rather than check all dependencies in F+.
we can show that if none of the dependencies in F causes a violaton of BCNF, then none of the dependencies in F+ will cause a violation of BCNF either
Unfortunately, the latter procedure does not work when a relation is decomposed
That is, it does not suffice to use F when we test a relation Ri, in a decompositon of R, for violation of BCNF. For example, consider relation schema R(A,B,C,D,E), with functional dependencies F containing A->B and BC->D. Suppose this were decomposed into R1(A,B) and R2(A,C,D,E). Now, neither of the dependencies in F contains only attributes from (A,C,D,E) so we might be misled into thinking R2 satisfies BCNF. In fact, there is a dependecies AC->D in F+(which can be inferred using the pseudotransitivity rule from the two dependencies in F), that shows that R2 is not in BCNF. Thus, we may need a dependency that is in F+, but is not in F, to show that a decomposed relation is not in BCNF
용어 설명
F+ : 함수 종속 집합 F에서 추론될 수 있는 모든 함수종속 집합
a+ : a->b꼴의 함수 종속에서 함수 종속 집합 F로부터 a를 좌변으로 하는 모든 가능한 우변의 집합
그러니까 릴레이션 스키마 R이 BCNF를 만족하는지 검사하는 간략화된 검사로써 릴레이션 스키마가 가지는 함수종속 F가 BCNF를 침해하는지만 검사하면 되는데 분해된 릴레이션의 경우에는 이 방법이 통하지 않는다
예를 들어 함수종속 F : A->B와 BC->D를 가지는 릴레이션 R(A,B,C,D,E)이 두 릴레이션 R1(A,B)와 R2(A,C,D,E)으로 분리되었을 때 함수종속 F의 어떠한 종속도 A,C,D,E의 속성만으로 이루어진게 없기 때문에 R2는 BCNF를 만족한다고 오인할 수 있다. 그러나 F+에 AC->D라는 종속이 있기 때문에(이는 F에서 가이행규칙에 의해 유도될 수 있음) R2는 BCNF를 만족하지 않는다.
이 말인데 이게 무슨 말인지 모르겠어 내가 이해가 안되는 부분은 "함수종속 F의 어떠한 종속도 A,C,D,E의 속성만으로 이루어진게 없기 때문에 R2는 BCNF를 만족한다고 오인할 수 있다." 이 부분이야
이거 아무도 모르네 답변이 하나도 없는거보면 어카냐;;; 이걸 이해해야 진도를 나가든 말든 하는데 ㅠㅠ 다른 책으로 바꿔야하나
함수 종속 F의 어떠한 종속도 A,C,D,E의 속성으로만 이루어진게 없기 때문 --> 그니까 F+에서는 A C D E로 구성된 함수 종속 집합 (예를 들어 A->CD, CD->E) 이런것이 없다는 얘기.
그러기 때문에 BCNF 정규화를 만족하는거 같이 보인다는거 아니야? 근데 A->B이고 BC->D 라는 종속이 있어서 가이행법칙에 의해 AC->D가 되므로 R2(A,C,D,E)에 모두 포함 될 수 있는거라는 뜻 같은데. 영어 원문을 잘 봐. 번역이 좀 틀렷네
결론 = 가이행법칙을 적용하기 전에는 포함 안될 수 있을거 같지만 적용 후에는 AC->D가 R2에 모두 들어있으므로 BCNF가 아니다!
답변 고마워. 거기까지는 이해가 가는데 F+의 좌우항에 있는 릴레이션의 집합이 R2에 속하는 릴레이션 만으로 이루어진 거 하고 BCNF를 만족하는거하고 무슨 관계가 있는거야? 이 책 이전 절에 나온 BCNF에 대한 설명을 보면 F+의 모든 a->b종속에 대해 1.a->b가 자명한(trivial) 종속이다(즉 b는 a에 속한다) 2.a는 R의 슈퍼키이다. 에서 1,2중 적어도 하나를 만족하면 릴레이션 스키마 R은 함수종속집합 F와 연관된 BCNF에 있다라고 한다 라고 적혀있는데