You are on page 1of 1
Schema Refinement and Normal Forms 261 3. Note that the following queries can be written with the NULL and NOT NULL. interchanged. Since we are doing a full join of a table and itself, we are creating ‘tuples in sets of two therefore the order is not important, SELECT COUNT (*) FROM RAS RI, RAS R2 WHERE ((RI.B != R2.B) AND (RIA = R2.A)) OR ((RLB is NULL) AND (R2.B is NOT NULL) AND (RLA = R2.A)) CREATE ASSERTION ADeterminesBNull CHECK ((SELECT COUNT (*) FROM RAS RI, RAS R2 WHERE ((R1.B != R2.B) AND (RLA = R2.A))) oR ((R1.B is NULL) AND (R2.B is NOT NULL) 4ND (RIA = R2.A)) =0) Exercise 19.5 Consider the following collection of relations and dependencies. As: sume that each relation is obtained through decomposition from a relation with at- tributes ABCDEFGHT and that all the known dependencies over relation ABCDEFGHT are listed for each question. (‘The questions are independent of each other, obviously, since the given dependencies over ABCDEFGHI are different.) For each (sub)relation: (a) State the strongest normal form that the relation is in, (b) If it is not in BCNE, decompose it into a collection of BCNF relations, 1. RI(A,C,B,D,B), A» B,C» D 2. R2A,B,F), AC + BB F 3. RS(A,D), D> 6, G9 H 4. RA(D,CH,G), A> 14 A 5. RIALCE) Answer 19.5 1. INF. BCNF decomposition: AB, CD, ACE. 2. INF. BONE decomposition: AB, BF 3. BONE, 4. BONE, 5. BONE,

You might also like