Programming Assignment #8
Due on Tuesday April 16 before midnight.
Using XQuery on Eclipse
This project must be done individually. No copying is permitted.
The purpose of this project is to learn XQuery.
You will do this project using Eclipse on your own PC/laptop.
You will use Zorba, which is a free implementation of XQuery.
You may also use XQDT, an XQuery plugin for Eclipse, but is not required.
If you yse the plugin, create an Xquery Project "project8" and an XQuery Main Module "queries.xq" inside this project.
Otherwise, put all XQueries in a file "queries.xq" and use the
Zorba Command Line Utility to evaluate the XQueries.
The following provide some tutorials. Use them as a reference only.
Consider the following XML document along with its DTD that describes auctions:
auction.zip (the zipped XML document)
It contains synthetic data (automatically generated).
The words for text paragraphs are taken from Shakespeare's plays.
There is also a DTD
(the link is not broken; use Save As to save it) for the XML file but it is not very useful.
Express the following queries using XQuery and run them against the file auction.xml using Zorba:
- Print the number of items listed on all continents.
- List the names of items registered in Europe along with their descriptions.
- List the names of persons and the number of items they bought.
- List all persons according to their interest (ie, for each iterest category, display the persons on that category).
- Group persons by their categories of interest and output the size of each group.
- List the names of persons and the names of the items they bought in Europe.
- Give an alphabetically ordered list of all items along with their location.
- List the reserve prices of those open auctions where a
certain person with id person3 issued a bid before another person with
What to Submit
Use the form below to submit your XQuery file (or you may zip all XQuery files and submit the zipped file).
Last modified: 04/15/13 by Leonidas Fegaras