Contents

Instructions

This homework should be uploaded to Canvas by 11:59pm on Sunday, October 26. All submissions should be in PDF format (if you use Word, select 'PDF' in the 'Save as' dialog). Be sure to list who you've worked with, if anyone.

Questions

1. (5 pts.) Consider the mondial-3.0.xml dataset we used in class. Write the XPath expression to list the names of all provinces that contain a city whose name begins with the letter 'B' and ends in the letter 'e'. Include the results in your submission.

2. (5 pts.) Write the XPath expression to list the names of all countries with more than 100 cities. Include the results in your submission.

3. (10 pts.) Write the XQuery expression (not XPath) to list the names of all countries sorted alphabetically by name and each name returned in <c></c> tags.

EmployeeInfo
EmployeeIDLastNameFirstNamePositionTitlePositionLevelBaseBonus
1JonesJanetEngineerII55000100
2JonesKendalEngineerII550000
3SmithJohnEngineerI500002500
4ZachsAprilEngineerI500000
5JacksonGeorgeManagerIII750000
6KrugerPatManagerIII750000
7MillerLouManagerI600004500

Functional Dependencies:

4. (5 pts.) For the relation and FDs above, what anomalies are exhibited? Explain how each is exhibited.

5. (5 pts.) What is the minimal key for this relation? Prove it using a formal method from the readings and/or videos.

6. (10 pts.) The table is not in BCNF; why not? After you explain the violations of BCNF, convert the relation into a new set of relations that are in BCNF.

7. (10 pts.) Draw the UML diagram corresponding to the relations from HW2.

(Back to top)