XML Pivot Join LET Binding Handling via Location Identifier Truncation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current XML pivot join procedures fail to properly handle LET bindings in XQuery FLWOR expressions, leading to incorrect filtering of XML documents, as they require matches under the same parent node, whereas XQuery FLWOR expressions allow matches under different parent nodes to qualify.
Innovation Solution
An apparatus and method that identify XPath steps under a LET binding, link them to a common non-LET binding ancestor, truncate location identifiers to this ancestor, and return qualifying documents if they match the FOR binding, ensuring correct document filtering during XML pivot join procedures.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the XML pivot join algorithm applies the AND operation on indexes requiring matches under the same parent node, then the filtering is efficient and straightforward, but documents that should qualify under XQuery FLWOR expressions are incorrectly excluded
Solution Approach 1:
The patent segments the XPath steps under a LET binding and processes them independently by truncating their location identifiers to the FOR binding level. This allows matches to be found under different parent nodes while still correctly evaluating the FLWOR expression, thereby improving filtering accuracy without requiring complex inter-node relationships.
Solution Approach 2:
The patent introduces an intermediary mechanism by truncating location identifiers to a common ancestor (the FOR binding). This intermediary approach allows the system to match XPath steps that would otherwise be under different parent nodes, enabling correct evaluation of LET bindings in XQuery FLWOR expressions while maintaining efficient index-based processing.
2Productivity
If the XML pivot join procedure uses standard index scanning for XPath expressions, then the processing is simple and fast, but it produces incorrect results for XQuery FLWOR expressions with LET bindings
Solution Approach 1:
The patent performs preliminary action by truncating the location identifiers of XPath steps under a LET binding to the FOR binding level before executing the index scan. This preliminary modification ensures that the subsequent index scanning operation can correctly match documents even when the XPath steps would otherwise require different parent nodes, thereby maintaining processing speed while improving result correctness.
3Ease of manufacture
If the algorithm requires all XPath steps under a LET binding to match under the same parent node, then the implementation is straightforward, but it excludes valid documents that should satisfy the XQuery FLWOR expression
Solution Approach 1:
The patent changes the dimension of matching by moving from requiring matches under the same immediate parent node to allowing matches under different parent nodes as long as they share a common FOR binding ancestor. This dimensional shift in the matching criterion enables more complete document matching while keeping the implementation relatively straightforward through location identifier truncation.
Data Source
AI summary
An apparatus and method for handling a LET binding used in a WHERE clause of an XQuery FLWOR expression during an XML pivot join procedure. XPath steps under a LET binding are identified and marked as bindings. During a match graph construction phase of the pivot join procedure, the bindings are linked to a first common non-LET binding ancestor, while traversing from the bottom up. A location identifier for each binding is truncated to the location identifier of the first common non-LET binding ancestor to create a truncated location identifier. The truncated location identifier is compared to a node identification of a FOR binding of the XQuery FLWOR expression. A match of the node identifications will qualify the XML document and the XML document is returned by the XML pivot join procedure.


