[home page]
NAME
CSE 670: Final Exam
Tu, Dec 9, 5:30–7:18
Open Notes, Open Books
The exam consists of four problems
Answers not appearing in designated spaces WILL NOT be graded
- Problem #1 (10 points)
Consider the following table.
- Show the functional dependencies satisfied by the given data.
- Is the data in 3NF? Justify your reply.
- Is the data in BCNF? Justify your reply.
- Is the multivalued functional dependency A →→ B satisfied? Justify your reply.
- Is the multivalued functional dependency B →→ A satisfied? Justify your reply.
- Problem #2 (10 points)
- Consider the schema {A,B,C,D,E,F,G,H} decomposition into R1 = {A,B,C}, R2 = {B,D,E,F}, and
R3 = {A,G,H}. Which of the following functional dependencies is preserved, and which is not preserved, under the
given decomposition? Justify your replies.
| AB | → | CH |
| A | → | DGH |
| D | → | AC |
| G | → | ACDH |
- Find two minimal covers for the following set of functional dependencies.
- Problem #3 (10 points)
Consider the schema R = {A,B,C,D,E}.
- Show that the decomposition R1 = {A,B}, R2 = {A,D}, R3 = {A,E} R4 = {B,E}, R5 = {C,D,E}. is lossless join
for the following functional dependencies.
| A | → | C |
| B | → | C |
| C | → | D |
| DE | → | C |
| CE | → | A |
- Find a lossless join functional-dependency preserving 3NF decomposition under the following functional
dependencies. Justify your reply.
- Problem #4 (10 points)
Consider the following relations.
EMPLOYEE
| NAME | SSN | CITY |
| Anna | 125-21-0987 | Cincinnati |
| Deborah | 124-12-3456 | Cleveland |
| Doug | 123-45-6789 | Columbus |
| Steve | 251-21-9870 | Cincinnati |
WORK_ON
| SSN | DNUM |
| 123-45-6789 | 1 |
| 124-12-3456 | 2 |
| 125-21-0987 | 1 |
| 251-21-9870 | 1 |
DEPARTMENT
| DNAME | DNUMBER | CITY |
| compiler | 1 | Columbus |
| database | 2 | Cincinnati |
- Provide a relational calculus query that provides the names of all the employees that do not work alone in a
department.
- Show the outcome of the following query.
w.SSN, d.DNAME | WORKS_ON(w) and DEPARTMENT(d) and ( ∃ e1, ∃ e2 ) ( EMPLOYEE(e1) and
EMPLOYEE(e2) and (e1.SSN > w.SSN) and (e2.SSN < w.SSN) )
- Provide the translation of the following relational calculus query into SQL.
{x.A,x.B|R1(x) and (∃y)(R2(y) and y.C <> x.A)}