Question: Question 3: In these exercises, you will be working with a small XML data set drawn from the Stanford course catalog. There are multiple departments,

Question 3:

In these exercises, you will be working with a small XML data set drawn from the Stanford course catalog. There are multiple departments, each with a department chair, some courses, and professors and/or lecturers who teach courses. The XML data is here (https://prod-c2g.s3.amazonaws.com/db/Winter2013/files/courses-noID.xml).

Write a query in XPath or XQuery

1-Return all Title elements (of both departments and courses).

2-Return last names of all department chairs.

3-Return titles of courses with enrollment greater than 500.

4-Return titles of departments that have some course that takes "CS106B" as a prerequisite.

5-Return last names of all professors or lecturers who use a middle initial. Don't worry about eliminating duplicates.

6-Return the count of courses that have a cross-listed course (i.e., that have "Cross-listed" in their description).

7-Return the average enrollment of all courses in the CS department.

8-Return last names of instructors teaching at least one course that has "system" in its description and enrollment greater than 100.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!