XML Evaluation Techniques
XML Evaluation Techniques is the important topic of the Data Management. Moreover, freestudy9 has all kind of important information and topic related to it.
Techniques for the efficient evaluation of XML queries, and in particular for tree pattern queries.
- The first techniques concern structural joins and can be seen as foundational to all the others.
- Moreover, Structural joins are physical operators capable of combining tuples from two inputs, much in the way regular joins in the related case do, but based on a structural condition (thus the name).
- Formally, let p1 and p2 be some partial evaluation plans in an XML database, such that attribute X in the output of p1, denoted p1.X, and attribute Y from the output of p2, denoted p2.Y, both contain structural IDs.
- Let ≺ denote the binary relationship “isParentOf” and ≺≺ denote the binary relationship “isAncestorOf”.
- Formally then, the structural join of p1 and p2 on the condition that p1.X be an ancestor of p2.Y is defined as:
- and the structural join on the parent relation ≺ is similarly defined by:
Nested loop join : XML Evaluation Techniques
- The simplest physical structural join algorithms could proceed in nested loops.
- Also, One iterate over the output of p1 and for each tuple, one iterate over the output of p2.
- However, this leads to CPU costs in O(|p1|x|p2|), since each p1 tuple compared with each p2
Hash join: XML Evaluation Techniques
- As in traditional relational database settings, one could consider hash joins that often called upon for good performance, given that their CPU costs are in O(|p1|+|p2|).
- However, hash-based techniques cannot apply here, because the comparisons that need to carried are of the form “is id1 an ancestor of id2?”, which do not lead themselves to a hash-based approach.
Stack-based join: XML Evaluation Techniques
- To efficiently perform this task, Stack-based structural joins operators have proposed originally for (start, end) ID scheme.
- So, They can use for other labeling schemes as well.
Optimizing Structural Join Queries
- Algorithm STD (Stack-Tree Descendant) allows combining two inputs based on a structural relationship between an ID attribute of one plan and an ID attribute of the other.
- Moreover, Using STD and the similar Stack-Tree Ancestor (STA), one can compute matches for larger query tree patterns, by combining sets of identifiers of nodes having the labels appearing in the query tree pattern.
- In general, it turns out that for any tree pattern query, there exist some plans using the STD and STA physical operators, and which do not require any Sort (also called fully pipelined plans).
- However, one cannot ensure a fully pipelined plan for a given join order.
- So, This complicates the problem of finding an effective evaluation plan based on structural joins because two optimization objectives are now in conflict:
- avoiding Sort operators (to reduce the time to the first output, and the total running time) and
- Choosing the join order that minimizes the sizes of the intermediary join results.
Related Terms : XML Evaluation Techniques