The document discusses functional dependencies and normal forms. It provides 6 exercises involving relation schemes with attributes and functional dependencies. The exercises involve finding keys, determining normal forms, decomposing relations, and determining lossless joins and projected dependencies.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
23 views2 pages
Lab 2 - 2023
The document discusses functional dependencies and normal forms. It provides 6 exercises involving relation schemes with attributes and functional dependencies. The exercises involve finding keys, determining normal forms, decomposing relations, and determining lossless joins and projected dependencies.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
Lab 2
Functional dependencies and Normal forms
EXERCISES 1. Consider the relation scheme with attributes S (store), D (department), I (item), and M (manager), with functional dependencies SI D and SD M. a) Find all keys for SDIM. b) Show that SDIM is in second normal form but not third normal form. 2. Consider the relation scheme with attributes CITY, ST, and ZIP, which we here abbreviate C, S, and Z. We observed the dependencies CS Z and Z C. The decomposition of the relation scheme CSZ into SZ and CZ has a lossless join. Does this decomposition preserve dependencies? 3. Let F = {AB C, A D, BD C}. a) Find a minimal basic for F. b) Give a 3NF, dependency-preserving decomposition of ABCD into only two schemes (with respect to the set of functional dependencies F). c) What are the projected dependencies for each of your schemes? d) Does your answer to (b) have a lossless join? If not, how could you modify the database scheme to have a lossless join and still preserve dependencies? 4. Let F = {AB C, A B}. a) Find a minimal basic for F. b) When (a) was given on an exam at a large western university, more than half the class answered G = {A B, B C}. Show that answer is wrong by giving a relation that satisfies F but violates G. 5. Suppose we are given relation scheme ABCD with functional dependencies {(A B, B C, A D, D C}. Let p be the decomposition (AB, AC, BD). a) Find the projected dependencies for each of the relation schemes of p. b) Does p preserve the given dependencies? 6. Consider the relation scheme ABCD with dependencies F={A B, B C, D B] We wish to find a lossless-join decomposition into BCNF. a) Suppose we choose, as our first step, to decompose ABCD into ACD and BD. What are the projected dependencies in these two schemes? b) Are these schemes in BNCF? If not, what further decomposition is necessary?