有序的XML分支模式的高效处理Efficient Processing of Ordered XML Twig Pattern
原站著录信息
摘要
Jiaheng Lu, Tok Wang Ling, Tian Yu, Changqing Li, Wei Ni School of computing, National University of Singapore {lujiahen,lingtw,yutian,lichangq,niwei}@comp.nus.edu.sg Abstract. Finding all the occurrences of a twig pattern in an XML database is a core operatio…
Jiaheng Lu, Tok Wang Ling, Tian Yu, Changqing Li, Wei Ni
School of computing, National University of Singapore
{lujiahen,lingtw,yutian,lichangq,niwei}@comp.nus.edu.sg
Abstract. Finding all the occurrences of a twig pattern in an XML database is a core operation for efficient evaluation of XML queries. Holistic twig join al-gorithm has showed its superiority over binary decompose based approach due to efficient reducing intermediate results. The existing holistic join algorithms, however, cannot deal with ordered twig queries. A straightforward approach that first matches the unordered twig queries and then prunes away the unde-sired answers is obviously not optimal in most cases. In this paper, we study a novel holistic-processing algorithm, called OrderedTJ, for ordered twig queries.
We show that OrderedTJ can identify a large query class to guarantee the I/O
optimality. Finally, our experiments show the effectiveness, scalability and ef-
ficiency of our proposed algorithm. 1 Introduction With the rapidly increasing popularity of XML for data representation, there is a lot of interest in query processing over data that conforms to a tree-structured data model([1],[5]). Efficient finding all twig patterns in an XML database is a major oncern of XML query processing. Recently, holistic twig join approach has been taken as an efficient way to match twig pattern since this approach can efficiently
control the size of intermediate results([1],[2],[3],[4]). We observe that, however, the
existing work on holistic twig query matching only considered unordered twig que-
ries. But XPath defines four ordered axes: following-sibling, preceding-sibling, fol-
lowing, preceding. For example, XPath: //book/text/following-sibling::chapter is an
ordered query, which finds all chapters in the dataset that are following siblings of
text which should be a child of book.
We call a twig query which cares the order of the matching elements as an or-dered twig query. On the other hand, we denote a twig query that does not consider the order of matching elements as an unordered query. In this paper, we research how to efficiently evaluate an ordered twig query. To handle an ordered twig query, naively, we can use the existing algorithm (e.g.
TwigStack[1]/TwigStackList[5]) to output the intermediate path solutions for each
individual root-leaf query path, and then merge path solutions so that the final solu-tions are guaranteed to satisfy the order predicates of the query. Although existing algorithms are applied, such a post-processing approach has a serious disadvantage:
many intermediate results may not contribute to final answers. Motivated by the recent success in efficient processing unordered twig queries ho-listically, we present in this paper a novel holistic algorithm, called OrderedTJ, for
ordered twig queries. The contribution of this paper can be summarized as follows:
1. We develop a new holistic ordered twig join algorithm, namely OrderedTJ,
based on the new concept of Ordered Children Extension (for short OCE). With
OCE, an element contributes to final results only if the order of its children ac-
cords with the order of corresponding query nodes. Thus, efficient holistic algo-
rithm for ordered-twigs can be leveraged.
2. If we call edges between branching nodes and their children as branching edges
and denote the branching edge connecting to the n’th child as the n’th branching
edge, we analytically demonstrate that when the ordered-twig contains only an-
cestor-descendant relationship from the 2nd branching edge, OrderedTJ is I/O
optimal among all sequential algorithms that read the entire input. In other
words, the optimality of OrderedTJ allows the existence of parent-child rela-
tionships in non-branching edges and the first branching edges.
3. Our experimental results show that the effectiveness, scalability and efficiency
of our holistic twig algorithms for ordered twig pattern.
The remainder of the paper is organized as follows. Section 2 presented related
work. The novel ordered twig join algorithm is described in Section 3. Section 4 is
dedicated to our experimental results and we close this paper by conclusion and fu-
ture work in Section 5. 2 Related work
With the increasing popularity of XML data, query processing and optimization for
XML databases have attracted a lot of research interest. There is a rich set of litera-
ture on matching twig queries efficiently. Below, we describe these literatures with
the notice that the existing work deals with only unordered twig queries.
Zhang et al.([9]) proposed a multi-predicate merge join (MPMGJN) algorithm
based on (DocId, Start, End, Level) labeling of XML elements. The later work by Al-
Khalifa et al.([7]) gave a stack-based binary structural join algorithm. Different from
binary structural join approaches, Bruno et al.([1]) proposed a holistic twig join algo-
rithm, called TwigStack, to avoid producing a large intermediate result. However, the
class of optimal queries in TwigStack is very small. When a twig query contains any
parent-child edge, the size of “useless” intermediate results may be very large. Lu et
al.([5]) propose a new algorithm called TwigStackList. They use list data structure to
cache limited elements to identify a larger optimal query class. TwigStackList is I/O
optimal for queries with only ancestor-descendant relationships in all branching
edges. Recently, Jiang et al.([3]) researched the problem of efficient evaluation of
twig queries with OR predicates. Chen et al.([2]) researched the relationship between
different data partition strategies and the optimal query classes for holistic twig join.
Lu et al.([6]) proposed a new labeling scheme called extended Dewey to efficiently
process XML twig pattern.
3 Ordered twig join algorithm
4 Experimental evaluation
5 Conclusion and future work
摘要:探索XML数据库分支模式的所有事件是有效评价XML疑问的核心操作。整体分支与算法的联合已经显示了基于二进制分解的优越性,因为它有效的减少了中间结果,现存的整体与算法的联合但是不能够解决有序的分支查询,一个简单的方法适用于元素的分支查询并且消减不需要得到的结果,很明显在大多数情况下,不是最令人满意的。在这篇文章中,我们要学习一种新颖的整体处理算法,叫做OrderedTJ,用来处理有序的分支查询,我们发现OrderedTJ能够识别一大类查询以保证I/O令人满意,最后我们的实验证明了我们提出的算法的有效性、可测量性和高效性。
1.说明
2.连接工作
