Your program should consist of a continuous loop in which:
Hand in your program and a script showing the program running. Each of
the options should be exercised at least once in your script.
(a) Find all candidate keys.
(b) Show that R is not in 3NF.
(c) Give a 3NF decomposition of R. Does this decomposition
verify BCNF?
(d) Given adecomposition
of R in the three following relations: R1 (A,B,C),
2. (15 pts.) Consider a relation scheme R =(A,B,C,D,E,F,G,H) and the following functional dependencies:
ABC --> E,FD --> A, AG --> E, H------->G,BC---->F,A---->H,and
(a) Find all candidate keys.
(b) Find a minimal cover of the set of dependencies.
(c) Compute (AF)+
(d) Prove that AF --> E follows from the given
set of functional dependencies by
deriving it using the inference rules given in class.
(e) Show that R is not in BCNF.
(f) Give a BCNF decomposition of R.
3.(25pts.) Let us consider the relations R(A,B,C); S(C, D,E); T(E,F,G); the number of tuples of each relation is: TR = 100,000; TS = 20,000; TT = 200,000. Assume each attribute is 10 bytes long. Each system page may hold 4 Kbytes of information. Suppose the following query:
SELECT R.A, S.D
FROM R,S,T
WHERE R.C = S.C AND S.E = T.E AND T.F = 12 AND R.B = 100 AND S.C = 20
a - Define one clustered index and one non-clustered index for each relation.
b- Give an execution plan, and compute the cost of the query
You should give reasonable values to the images(# of different values) of
each attribute in the relations.
c - Compare the cost of the query, with the cost of the nested loops strategy
(without indexes).