user446836
user446836

Reputation: 733

Object Oriented query in XQuery

I have no problem writing XQuery queries using relational style joins. However I am having some troubles using object-oriented style constructs. I have an xml database whose scheme can be found in the xsd document -> http://pastebin.com/Jj6PMgxe. And a diagram of the database is below. enter image description here

I am trying to list the StudentIDs of students and the FacultyIDs of their Mentors for students who have got at least one A in their grades. Any help is appreciated. Thanks

Upvotes: 0

Views: 775

Answers (1)

Michael Kay
Michael Kay

Reputation: 163262

Forget about object-orientation. XQuery isn't an object-oriented language. Don't describe your input in terms of an object-oriented model, describe it in XML terms as a tree or set of trees. XQuery is designed for processing XML; the data model and the processing model go together, and you need to think in terms of XML/XQuery, not in terms of some other paradigm.

Upvotes: 2

Related Questions