The document discusses relational database design and normalization. It covers topics like functional dependencies, normal forms like first normal form, Boyce-Codd normal form and third normal form. The goal of normalization is to organize data in a database to avoid insertion, deletion and update anomalies. Normalization techniques like decomposition are used to divide tables and isolate data to achieve higher normal forms.
45. BCNF Decomposition Algorithm result := { R }; done := false; compute F + ; while (not done) do if (there is a schema R i in result that is not in BCNF) then begin let be a nontrivial functional dependency that holds on R i such that R i is not in F + , and = ; result := ( result – R i ) ( R i – ) (, ); end else done := true; Note: each R i is in BCNF, and decomposition is lossless-join. 7.45 Database System Concepts - 5 th Edition, July 28, 2005.
46.
47.
48.
49.
50.
51.
52.
53. 3NF Decomposition Algorithm Let F c be a canonical cover for F; i := 0; for each functional dependency in F c do if none of the schemas R j , 1 j i contains then begin i := i + 1; R i := end if none of the schemas R j , 1 j i contains a candidate key for R then begin i := i + 1; R i := any candidate key for R; end return (R 1 , R 2 , ..., R i ) 7.53 Database System Concepts - 5 th Edition, July 28, 2005.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67. 4NF Decomposition Algorithm result: = { R }; done := false; compute D + ; Let D i denote the restriction of D + to R i while ( not done ) if (there is a schema R i in result that is not in 4NF) then begin let be a nontrivial multivalued dependency that holds on R i such that R i is not in D i , and ; result := ( result - R i ) ( R i - ) (, ); end else done := true; Note: each R i is in 4NF, and decomposition is lossless-join 7.67 Database System Concepts - 5 th Edition, July 28, 2005.