Abstract

SQL standard provides SQL/XML publishing functions to publish the result of an SQL query as XML values but it does not provide any SQL/XML publishing function that can publish the result of a recursive SQL query as recursively structured XML values. Therefore, to publish transitively connected relational tuples as recursively structured XML values with the use of appropriate SQL/XML publishing functions, we have to write a nested SQL query. Writing that query, however, is not easy provided that the depth of the connections is deep even if we know the depth of them and is not possible once the depth of the connections is not known in advance. To solve the problem, we propose a new SQL function XMLNEST that can publish the result of a recursive SQL query as recursively structured XML values. Both the recursive structure and the order of sibling XML elements of the XML values can be specified in the invocation of XMLNEST. Our experiments show that the proposed scheme will be the unique reasonable solution to the problem.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call