We could also have decided to have one XML document per employee (fine granularity), with an additional "dept" attribute for each employee to indicate which department he or she belongs to.
我们还可以决定为每个雇员使用一个XML文档(细粒度),并使用一个附加的“dept”属性,表明他或她属于哪个部门。
In Query 12, we pass every dept and project document into the XQuery inside XMLEXISTS and express the join condition there.
在查询11中,我们将每一个dept和project文档放入XMLEXISTS中传递给XQuery,并在那里表示连接条件。
Query 23 returns one row for each dept document, and each row contains the names of employees working in that department.
查询21为每个dept文档都返回一行,每个行都包含在该部门中工作的员工姓名。
应用推荐