]
>
sample final exam
[home page ]
NAME ¯
CSE 670: Final Exam
Tu, Dec 9, 5:30–7:18
Open Notes, Open Books
The exam consists of f o u r ¯
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 R 1 = { A , B , C } ,
R 2 = { B , D , E , F } , and
R 3 = { A , G , H } . Which
of the following functional dependencies is preserved, and which is not preserved, under the given decomposition?
Justify your replies.
A B → C H
A → D G H
D → A C
G → A C D H
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 R 1 = { A , B } ,
R 2 = { A , D } ,
R 3 = { A , E }
R 4 = { B , E } ,
R 5 = { C , D , E } . is
lossless join for the following functional dependencies.
A → C
B → C
C → D
D E → C
C E → 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 | R 1 ( x ) a n d ( ∃ y ) ( R 2 ( y ) a n d y . C < > x . A ) }