Essay
Provide XQuery expressions for the following queries based on the sample XML file (books.xml) below.
(a) List the title of the first book.
(b) List the titles of all the books along with a count of the number of books.
(c) List the title and price of each book published in the year 2003.
(d) List the title and numbers of authors of each book.
(e) List the titles of books whose price is less than $60.
(f) List the titles of books in alphabetical order.
(g) List the authors, sorted in reverse order of surname, then first name.
(h) List the authors as a single string, sorted in reverse order of surname, then first name.
(I) List the titles of books that have at least one author called Thomas Connolly.
(j) List the titles of books that have every author called Thomas Connolly.
(k) List books by author.
(l) Test whether the most expensive book is also the book with the largest number of authors/editors.
(m) List the books where Begg is an author but is not listed as the first author.
(n) List the titles of books that are more expensive than the average book price.
Correct Answer:

Verified
(a) doc("books.xml")/book[1]/title
This ...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
This ...
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q8: The main characteristics for describing Online Transaction
Q9: Discuss the relationship between online transaction processing
Q10: 'Data warehouse and the underlying support for
Q11: "A subject-oriented, integrated, time-variant, and non-volatile collection
Q12: Discuss what you consider to be the
Q13: Discuss the current issues associated with the
Q15: Describe the architecture and major components of
Q16: Despite the excitement surrounding XML, it is
Q17: Describe how data marts differ from a
Q18: Discuss the reasons why an organisation may