1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
xxMikexx [17]
3 years ago
11

Using the XML Document below (library with books), define the following queries in XQuery: (a) Give the titles of all Books sort

ed by Price. (b) How many books were written by Abiteboul? (c) Give for each author, the number of books he has written.
Computers and Technology
1 answer:
Softa [21]3 years ago
3 0

Answer:

Explanation:

a)use order by clause for sorting

for $x in doc("books.xml")/bib/book order by xs:float($x/price) return $x/title (default sorted in ascending order)

or

for $x in doc("books.xml")/bib/book order by xs:float($b/price) descending  return $b/title (sorted in descending order)

b)doc("books.xml")//book[author = 'Abiteboul']

c)for $x in distinct-values(doc("bib.xml")/bib/book/author)

return <res>

<name>{$x}</name>

<count>

 {count (doc("bib.xml")//book[exists(indexof(author,$x))]) }

</count>

<res>

You might be interested in
The World Wide Web is full of unstructured data. Search engines like Google, Bing and Yahoo have been doing a good job of allowi
bija089 [108]

Answer: Query

Explanation:

The Search Criteria is entered and any when a related Query is logged, it speedily bring out the linked details for exploration.

5 0
3 years ago
When choosing a new computer to buy, you need to be aware of what operating _____ a0 it uses.
Alla [95]

System?

ddfdfdfdfdfdddddddddddddddddddddddddddddddddddd

8 0
3 years ago
What are the types of action involving data base?
Alexeev081 [22]

Answer: The DBMS is a software system that explains the four types of actions, which are defining, constructing, manipulating, and sharing databases among various users and applications.

3 0
3 years ago
I need some help pleas hurry
Alexandra [31]
Opinion is the answer, every thing else can be compared with the data
8 0
3 years ago
Pleeeese help me for these questions
geniusboy [140]

1 Account

2 online

3 access

4 password

5 internet

6 email

4 0
3 years ago
Other questions:
  • What does xhtml stand for?
    5·2 answers
  • To change to the completed application’s directory, we opened a command window and used the ________ command to change to the di
    7·1 answer
  • Binary is best interpreted by a computer because?
    8·2 answers
  • Why do most laptops have LCD rather than OLED displays, which are found on mobile devices?
    9·1 answer
  • You are having problems on your Windows 7 computer and you pull up Device Manager to see if there are any alerts. Two of your de
    11·1 answer
  • True or False <br><br> The term virus and malware may be used interchangeably.
    13·1 answer
  • A sense of scale tells us what about the objects in a picture?
    11·2 answers
  • Is a psychrometer more likely used at a beach or a desert in California
    12·1 answer
  • When a chart is selected, numerous customization options can be found on which Chart Tools tabs?
    11·2 answers
  • There are....... section in<br>cpu<br>​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!