Create a document that lists every course and the professors who taught it. The course information must include the course name, and the professor information should include the professor’s name.
Use the document structure described in Exercise 15.23 to formulate the following queries in XQuery:
{
FOR $c IN doc("http://xyz.edu/courses.xml")//tuple
LET $tch := doc("http://xyz.edu/teaching.xml")
//tuple[CrsCode/@value=$c/CrsCode/@value]
LET $profs := {
FOR $t IN $tch,
$p IN doc("http://xyz.edu/professor.xml")
//tuple[Id/@value=$t/ProfId/@value]
}
RETURN
$c/CrsName
{
FOR $p IN distinct-values($profs)
RETURN$p/Name
}
}
Computer Science & Information Technology
You might also like to view...
When a chart is selected and you click the Chart Tools Design tab and the Change Chart Type button, ________ display in the left pane and ________ display in the right pane
A) common charts; less common charts B) chart subtypes; chart types C) chart types; chart subtypes D) 3-D chart types; 2-D chart types
Computer Science & Information Technology
The maximum number of colors you should use when creating a composition is ____.
a. five b. seven c. eight d. nine
Computer Science & Information Technology