- An Injection with Tree Awareness: Adding Staircase Join to PostgreSQL

https://doi.org/10.1016/B978-012088469-8.50133-9Get rights and content

Publisher Summary

The XPath accelerator encodes the tree structure of an XML document using unique pairs of integer values, the nodes' preorder and postorder traversal ranks. If these ranks are used to place the document nodes in the two-dimensional pre/post plane, it becomes apparent that the encoding preserves an important property. Any context node v divides the XML document into four disjoint regions, whose union plus v itself covers all nodes of the document. The four regions correspond to the result of the XPath location steps v/preceding, v/ancestor, v/following, and v/descendant, respectively. In a conventional Relational Database Management System (RDBMS), an evaluation of an XPath location step amounts to query plans in which the computation of the region queries happens on a per-context-node-basis. In contrast to that, staircase join employs three techniques (pruning, partitioning, and skipping) that devise a significantly more efficient way to work with tree-structured data. Most importantly, staircase join makes sure that the evaluation of an XPath location step requires at most one sequential scan of the document table, and that the result of each location step is duplicate-free and sorted in the document order.

References (0)

Cited by (6)

View full text