Appendix B Advanced Relational Database Design R1-R2 R1∩R2 ΠR,(G) a...ai a+1…0j ΠR(t) b1·.b 4i+1·.。a R1∩R2 R2-R1 ΠR2() ai+1···aj aj+1···an ΠR2(t2) a+1·· bi+1...bn Figure B.3 I(r)and I(r). Consider the join dependency *(R,R2)on schema R.This dependency re- quires that,for all legal r(R), r=ΠR(r))凶ΠR2(r) Let r contain the two tuples h and f2,defined as follows: t[R1-R2]=(a1,a2,,a)t2[R1-2]=(b1,b2,,b) [RnR]=(a+1,,a)[R∩R]=(ai+1,,0j) t[R2-R]=(aj+1,,an)[R2-R]=(bj+1,,bn) Thus,h[Rn R2]t2[Rn R2],but h and t2 have different values on all other attributes.Let us compute IIR(r)IIR,(r).Figure B.3 shows IIR(r)and IIR(r).When we compute the join,we get two tuples in addition to h and t2, shown by t3 and ta in Figure B.4. If *(R1.R2)holds,then,whenever we have tuples h and b2,we must also have t3 and t4.Thus,Figure B.4 shows a tabular representation of the join dependency *(R1.R2).Compare Figure B.4 with Figure 8.13,in which we gave a tabular representation of oB.If we let o=Rin R2 and B R1,then we can see that the two tabular representations in these figures are the same.Indeed,*(R1,R2) is just another way of stating Rin R2R1.Using the complementation and augmentation rules for multivalued dependencies,we can show that Rin R2 →R1 implies Rin R2-→→ R2.Thus,*(R1,Rz)is equivalent to Rin R2→→R2: This observation is not surprising in light of the fact we noted earlier that Ri and R1-R2 R1∩R2 R2-R1 t a1...a 01+1···a ai+1···am t2 b1… bi ai+1...a bj+1...On a1··a a+1..·a bi+1...bn b1...b a+1···a g+1··an Figure B.4 Tabular representation of *(R1.R2).6 Appendix B Advanced Relational Database Design ΠR1 (t1) ΠR1 (t2) ΠR2 (t1) ΠR2 (t2) R1 R2 R1 R2 R1 – R2 a1 . . . ai b1 . . . bi ai + 1 . . . aj ai + 1 . . . aj ai + 1 . . . aj ai + 1 . . . aj aj + 1 . . . an bj + 1 . . . bn R2 – R1 Figure B.3 R1 (r) and R2 (r). Consider the join dependency *(R1, R2) on schema R. This dependency requires that, for all legal r(R), r = R1 (r) ✶ R2 (r) Let r contain the two tuples t1 and t2, defined as follows: t1[R1 − R2] = (a1, a2,..., ai) t2[R1 − R2] = (b1, b2,..., bi) t1[R1 ∩ R2] = (ai + 1,..., a j) t2[R1 ∩ R2] = (ai + 1,..., a j) t1[R2 − R1] = (a j + 1,..., an) t2[R2 − R1] = (b j + 1,..., bn) Thus, t1[R1 ∩ R2] = t2[R1 ∩ R2], but t1 and t2 have different values on all other attributes. Let us compute R1 (r) ✶ R2 (r). Figure B.3 shows R1 (r) and R2 (r). When we compute the join, we get two tuples in addition to t1 and t2, shown by t3 and t4 in Figure B.4. If *(R1, R2) holds, then, whenever we have tuples t1 and t2, we must also have t3 and t4. Thus, Figure B.4 shows a tabular representation of the join dependency *(R1, R2). Compare Figure B.4 with Figure 8.13, in which we gave a tabular representation of →→ . If we let = R1 ∩ R2 and = R1, then we can see that the two tabular representations in these figures are the same. Indeed, *(R1, R2) is just another way of stating R1 ∩ R2 →→ R1. Using the complementation and augmentation rules for multivalued dependencies, we can show that R1 ∩ R2 → → R1 implies R1 ∩ R2 →→ R2. Thus, *(R1, R2) is equivalent to R1 ∩ R2 →→ R2. This observation is not surprising in light of the fact we noted earlier that R1 and R1 R1 R2 – R2 R2 – R1 a1 . . . ai t1 t2 b1 . . . bi ai + 1 . . . aj ai + 1 . . . aj a1 . . . ai t3 t4 b1 . . . bi aj + 1 . . . an bj + 1 . . . bn bj + 1 . . . bn aj + 1 . . . an ai + 1 . . . aj ai + 1 . . . aj Figure B.4 Tabular representation of *(R1, R2).