Docsity

Database Design Homework Assignment - Prof. Jessica Lin, Assignments of Introduction to Database Management Systems

Toggle sidebar
bg1
INFS 614 – Prof. Jessica Lin, George Mason University
Homework Assignment 5 (due 12/2 in class)
Note: You will only get credit if you show
your work.
Problem 1. Given a relation R with four attributes ABCD and a set of FDs {A B, BC
D, AD C}, compute F+ by
(a) first computing all attribute closures. A+ is completed for you.
Attribute closure
A+ AB
B+
C+
D+
AB+
AC+
AD+
BC+
BD+
CD+
ABC+
ABD+
ACD+
BCD+
ABCD+
(b) adding a to the table entry if (the column) is in (the row)+. The first row is
completed for you.
A B C D A
B
A
C
A
D
B
C
B
D
C
D
AB
C
AB
D
AC
D
BC
D
ABC
D
A
B
C
D
AB
AC
AD
BC
BD
CD
ABC
pf2

Partial preview of the text

Download Database Design Homework Assignment - Prof. Jessica Lin and more Assignments Introduction to Database Management Systems in PDF only on Docsity!

INFS 614 – Prof. Jessica Lin, George Mason University

Homework Assignment 5 (due 12/2 in class)

Note: You will only get credit if you show

your work.

Problem 1. Given a relation R with four attributes ABCD and a set of FDs {A  B, BC  D, AD  C}, compute F+ by (a) first computing all attribute closures. A+ is completed for you. Attribute closure A+ AB B+ C+ D+ AB+ AC+ AD+ BC+ BD+ CD+ ABC+ ABD+ ACD+ BCD+ ABCD+ (b) adding a  to the table entry if (the column) is in (the row)+. The first row is completed for you. A B C D A B

A

C

A

D

B

C

B

D

C

D

AB

C

AB

D

AC

D

BC

D

ABC

D

A ^ ^ 

B

C

D

AB

AC

AD

BC

BD

CD

ABC

ABD

ACD

BCD

ABC

D

(c) What are the candidate key(s) for R? Problem 2 (Exercise 19.2). Consider a relation R with 5 attributes ABCDE. You are given the following dependencies: {A  B, BC  E, ED  A}. (a) List all keys for R. (b) Is R in 3NF? (c) Is R in BCNF? Problem 3 (Exercise 19.8). Consider the attribute set R = ABCDEGH and the FD set F = {AB  C, AC  B, AD  E, B  D, BC  A, E  G}. (a) For each of the following attribute sets, do the following: (i) Compute the set of dependencies that hold over the set and write down a minimal cover. (ii) Name the strongest normal form that is not violated by the relation containing these attributes. (iii) Decompose it into a collection of BCNF relation if it’s not in BNCF.

  1. ABC
  2. ABCD
  3. ACEH (b) Are the following decompositions of R = ABCDEG, with the same set of dependencies F, (i) dependency-preserving? (ii) lossless-join?
  4. {AB, BC, ABDE, EG}
  5. {ABC, ACDE, ADG}