lationships. However, the approach to examine XML
queries against document elements in post-order was
first introduced by (Chen et al., 2006), Twig
2
Stack.
The decomposition of twigs into a set of single paths
and the enumeration of these paths is not necessary to
process twig pattern queries. The key idea of their ap-
proach is based on the proposition that when visiting
document elements in post-order, it can be determi-
ned whether or not they contribute to the final result
before storing them in intermediate storage, which
is trees of stacks, to ensure linear processing. Twi-
gList (Qin et al., 2007) replaced the complex interme-
diate storage proposed in Twig
2
Stack with lists (one
for every query node) and pointers with simple inter-
vals to capture structural relationships. The authors
in (Grimsmo et al., 2010) proposed a new storage
scheme, level vector split which splits the list con-
nected to its parent list with P-C edge to a number of
levels equals to the depth of the XML tree.
6 CONCLUSION
In this paper we have proposed a new mechanism to
improve the pre-filtering strategy in twig join algo-
rithms when P-C edges exist in twig patterns. The
new technique has the ability to ensure pruning of un-
necessary elements from the streams which can en-
hance runtime efficiency and relieve memory con-
sumption by avoiding the storage of redundant paths.
We are currently working to extend our approach to
combine with the previous orthogonal algorithms to
propose a new one-phase twig join algorithm that we
hope will be faster in average worst-case than the pre-
vious algorithms. Furthermore, we plan to examine
processing ordered twig patterns and positional pre-
dicate in a way that would consume less time and me-
mory than the existing approaches.
REFERENCES
Alireza Aghili, S., Alireza Aghili, S., Hua-Gang, L., Hua-
Gang, L., Agrawal, D., Agrawal, D., El Abbadi, A.,
and El Abbadi, A. (2006). TWIX: twig structure and
content matching of selective queries using. InfoScale
’06: Proceedings of the 1st international conference
on, page 42.
Bruno, N., Koudas, N., and Srivastava, D. (2002). Holis-
tic twig joins: optimal XML pattern matching. In
Proceedings of the 2002 ACM SIGMOD international
conference on Management of data, pages 310–321,
Madison, Wisconsin. ACM.
Chen, S., Li, H.-G., Tatemura, J., Hsiung, W.-P., Agra-
wal, D., Sel, K., #231, uk Candan, and Candan,
K. S. (2006). Twig2Stack: bottom-up processing
of generalized-tree-pattern queries over XML docu-
ments.
Chen, T., Lu, J., and Ling, T. W. (2005). On Boosting Ho-
lism in XML Twig Pattern Matching Using Structural
Indexing Techniques. Science, pages 455–466.
Choi, B., Mahoui, M., and Wood, D. (2003). On the optima-
lity of holistic algorithms for twig queries. Database
and Expert Systems Applications, pages 28–37.
Grimsmo, N., Bjørklund, T. A., and Hetland, M. L. (2010).
Fast optimal twig joins. VLDB, 3(1-2):894–905.
Li, J. and Wang, J. (2008). Fast Matching of Twig Patterns.
Lecture Notes in Computer Science (including subse-
ries Lecture Notes in Artificial Intelligence and Lec-
ture Notes in Bioinformatics), 5181 LNCS:523–536.
Lu, J., Chen, T., and Ling, T. W. T. (2004). Efficient Proces-
sing of XML Twig Patterns with Parent Child Edges :
A Look-ahead Approach. In Proceedings of the thir-
teenth ACM international conference on Information
and knowledge management, number i, pages 533–
542, Washington, D.C., USA. ACM.
Lu, J., Meng, X., and Ling, T. W. (2011). Indexing and que-
rying XML using extended Dewey labeling scheme.
Data & Knowledge Engineering, 70(1):35–59.
Qin, L., Yu, J. X., and Ding, B. (2007). TwigList: Make
Twig Pattern Matching Fast. In Kotagiri, R., Krishna,
P. R., Mohania, M., and Nantajeewarawat, E., edi-
tors, Advances in Databases: Concepts, Systems and
Applications: 12th International Conference on Da-
tabase Systems for Advanced Applications, DASFAA
2007, Bangkok, Thailand, April 9-12, 2007. Procee-
dings, pages 850–862. Springer Berlin Heidelberg,
Berlin, Heidelberg.
Wu, H., Lin, C., Ling, T. W., and Lu, J. (2012). Processing
XML twig pattern query with wildcards. Lecture No-
tes in Computer Science (including subseries Lecture
Notes in Artificial Intelligence and Lecture Notes in
Bioinformatics), 7446 LNCS:326–341.
Zhang, C., Naughton, J., DeWitt, D., Luo, Q., and Lohman,
G. (2001). On supporting containment queries in rela-
tional database management systems. ACM SIGMOD
Record, 30:425–436.
A Prime Number Approach to Matching an XML Twig Pattern including Parent-Child Edges
211