1) Consider the following DTD. All unspecified elements are #PCDATA. ... ]> Write the following queries in XQuery. Assume Last names of authors are unique. (a) List all books authored by Ullman. (b) List articles published in Vol. 32 No. 2 of ACM Transactions on Database Systems. (c) List journals that published an article on XML in 2001 (that is, “XML” appears in the title of the
1)
Consider the following DTD. All unspecified elements are #PCDATA.
<!DOCTYPE bibliography [
<!ELEMENT book (title,author+,year,publisher,place?)>
<!ELEMENT article (title,author+,journal,year,number,volume,pages?)>
<!ELEMENT author (last_name, first_name)>
...
]>
Write the following queries in XQuery. Assume Last names of authors are unique.
(a) List all books authored by Ullman.
(b) List articles published in Vol. 32 No. 2 of ACM Transactions on
(c) List journals that published an article on XML in 2001 (that is, “XML” appears in the title of the
article).
(d) List authors that have published a book in 2001 and another book in 2003.
(e) List publishers, and for each publisher list the books they have published as subelements. Choose
appropriate tags for your output.
(f) List every author, and for each author list the number of articles he/she published in 2001. Choose
appropriate tags for your output.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images