0

使用关系样式连接编写 XQuery 查询没有问题。但是,我在使用面向对象的样式构造时遇到了一些麻烦。我有一个 xml 数据库,其方案可以在 xsd 文档 -> http://pastebin.com/Jj6PMgxe中找到。下面是数据库的图表。在此处输入图像描述

我正在尝试为成绩至少获得 A 的学生列出学生的 StudentID 和导师的 FacultyID。任何帮助表示赞赏。谢谢

4

1 回答 1

2

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.

于 2011-11-09T22:13:50.030 回答