CS 4250: Database Management Systems
Fall 2019 - Homework 3
Due Wednesday 11/13/2019, at midnight
This is an individual assignment. All work must be your own.
You should not look at any other student's work (in whole or in part, on paper
or on screen), nor allow anyone else to look at yours, during the course of this assignment.
(Strongly prefer plain text.
Will accept PDF or MSWord documents, if typed.)
Email with subject line "cs4250,hw3" (by midnight), or turn in a typed
hardcopy during class time on the due date.
Consider a relation R with attributes ABCDEF. You
are given the following dependencies B -> A, D -> E, AC -> E.
- Attribute closure of B?
- Attribute closure of C?
- Attribute closure of D?
- Attribute closure of AC?
- Attribute closure of ABCDEF?
- Identify which, if any, of the above are candidate keys.
Consider a relation R with attributes ABCDE. You
are given the following dependencies AC -> B, AC -> D, AC -> E, C -> E.
- List all (candidate) keys for R.
- Is R in 3NF? Why or why not?
- Is R in BCNF? Why or why not?
Consider a relation R with attributes ABCDE. You
are given the following dependencies A -> B, A -> C, A -> D, A -> E, C -> A.
- List all (candidate) keys for R.
- Is R in 3NF? Why or why not?
- Is R in BCNF? Why or why not?
Consider a relation R with attributes ABCDE. You
are given the following dependencies AB -> C, AB -> D, AB -> E, D -> B.
- List all (candidate) keys for R.
- Is R in 3NF? Why or why not?
- Is R in BCNF? Why or why not?
- Suppose that we have the following three tuples in a legal
instance of a relation schema S with attributes primary_key, A, B and C:
attribute names | primary_key | A | B | C |
tuple 1 | 1 | 4 | 1 | 3 |
tuple 2 | 2 | 2 | 3 | 5 |
tuple 3 | 3 | 8 | 2 | 5 |
- For each of the following dependencies, can you infer whether or not it
holds over schema S? Why or why not?
- A -> C
- C -> A
- Can you identify any functional dependencies that hold over fields A, B and / or C? If so, please name one.
(N.B. primary_key is not on the list of A, B and / or C. FDs involving the primary_key field should not be in your answer.)
- Suppose you are given a relation R(A, B, C, D).
For each of the following sets of FDs, assume they are the only dependencies that
hold for R. Do the following: a) identify the candidate key(s) for R. b) State
whether or not the proposed decomposition of R into smaller relations is a good
decomposition and briefly explain why or why not.
- A -> B, B -> C, B -> D; decompose into ABC and BCD.
- Candidate keys:
- Analysis:
- A -> B, C -> D; decompose into AB and CD.
- Candidate keys:
- Analysis:
- A -> BC, D -> B; decompose into ABC and BD.
- Candidate keys:
- Analysis:
- B -> C, D -> A; decompose into BCD and AD.
- Candidate keys:
- Analysis:
- Suppose you are given a relation R with attributes ABCDEF. You are given
functional dependencies A -> E, AC -> B, and D -> C. Using the decomposition techniques
described in class, decompose this relation into relations in "good" normal forms.
For each of the new relations you create, identify the normal form it is in.
If you
choose not to decompose the relations into the best normal form we discussed, explain
why you made that choice. If there are any interesting issues or potential problems
with your decomposition, explain what they are.