Home / Expert Answers / Computer Science / consider-the-universal-relation-r-a-b-c-d-e-f-g-h-and-the-set-of-nbsp-functional-dependen-pa752

(Solved): Consider the universal relation R = {A, B, C, D, E, F, G, H} and the set of functional dependen ...



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>


a) Consider the universal relation \( R=\{A, B, C, D, E, F, G, H\} \) and the set of functional dependencies \( \exists=\{\{A
a) Consider the universal relation \( R=\{A, B, C, D, E, F, G, H\} \) and the set of functional dependencies \( \exists=\{\{A, B\} \rightarrow\{C\},\{B\} \rightarrow\{D\},\{E\} \rightarrow\{F, G\},\{D\} \rightarrow\{H\}\} \). 1) What is the key for \( R \) ? 2) If \( R \) is not in \( 2 N F \), first decompose it into \( 2 N F \) and then 3NF relations; if \( R \) is in \( 2 N F \) but not in \( 3 N F \), decompose it into 3 NF 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> \( \langle \) Member id=" 1 " level=" gold"> \( < \) Name \( > \) Jeff \) \( < \) Phone type="home">555-1234 \) \( < \) Phone type \( = \) "work" \( >555-4321 \) \( < \) FavoriteColor>lightgrey \( < \) /Member> \( < \) Member id="2" level="gold"> \( < \) Name \( > \) David \) \( < \) Phone type="home">383-1234 \( < \) Phone type="work" \( >383-4321 \) \( < \) FavoriteColor>lightblue \( \( \langle \) Member id="3" level="platinum"> \( < \) Name \( > \) Roger \( \) \( < \) Phone type="home">888-1234 \( < \) Phone type="work"> \( 888-4321 \) \( < \) FavoriteColor>lightyellow \( < \)


We have an Answer from Expert

View Expert Answer

Expert Answer


A minimal set of attributes whose closure includes all the attributes in R is a key. Since the closure of {A, B}, {A, B}+ = R, one key of R is {A, B}.
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe