An Extensible Framework for XPath Query Minimization
LIN Feng,FENG Jian-Hua,TA Na,LI Guo-Liang,HONG Qin
DOI: https://doi.org/10.3969/j.issn.1002-137X.2008.03.016
2008-01-01
Computer Science
Abstract:XPath is a standard language for XML queries,and XPath query minimization is very important for improving the performance of XML queries. However,XPath query minimization is a coNP-complete problem,and most previous algorithms are restricted to simple XPath fragments. We study the problem from a novel perspective,and present an efficient and extensible framework of query minimization. Traditional methods,which are "node oriented",always delete redundant node one by one,however we present an alternative way of "tree pattern oriented". We first compute endomorphism of the initial tree pattern,then find the endomorphism with the smallest target nodes collection size,and finally retrieve the minimal equivalent query pattern tree. Our method is efficient,and is complete under certain conditions. More importantly,it can be extended to more complex XPath fragments. We also give an algorithm,which is adaptive to complex query patterns based on the new framework.