Consider the universal relation R = {A, B, C, D, E, F, G, H} and the set of
functional dependencies F = {{A, B}?{C}, {B}?{D}, {E}?{F, G}, {D}?{H}}.
1) What is the key for R?
2) If R is not in 2NF, first decompose it into 2NF and then 3NF
relations; if R is in 2NF but not in 3NF, decompose it into 3NF relations;
otherwise, do nothing.
b) Design a proper DTD for the FitnessCenter XML document.
c) For the following queries on the XML document below for classes, write
the corresponding XPath expressions.
1) Find the work phone number of Roger.
2) Find the name of all members at the platinum level.
3) When pointing to the level attribute of “Jeff”, find the level attribute
of the member next to “Jeff”.
<?xml version="1.0"?>
<FitnessCenter>
<Member id="1" level="gold">
<Name>Jeff</Name>
<Phone type="home">555-1234</Phone>
<Phone type="work">555-4321</Phone>
<FavoriteColor>lightgrey</FavoriteColor>
</Member>
<Member id="2" level="gold">
<Name>David</Name>
<Phone type="home">383-1234</Phone>
<Phone type="work">383-4321</Phone>
<FavoriteColor>lightblue</FavoriteColor>
</Member>
<Member id="3" level="platinum">
<Name>Roger</Name>
<Phone type="home">888-1234</Phone>
<Phone type="work">888-4321</Phone>
<FavoriteColor>lightyellow</FavoriteColor>
</Member>
</FitnessCenter>