Fast Matching of Twig Patterns

  • Authors:
  • Jiang Li;Junhu Wang

  • Affiliations:
  • School of Information and Communication Technology, Griffith University, Gold Coast, Australia;School of Information and Communication Technology, Griffith University, Gold Coast, Australia

  • Venue:
  • DEXA '08 Proceedings of the 19th international conference on Database and Expert Systems Applications
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Twig pattern matching plays a crucial role in ${\sc xml}$ data processing. Existing twig pattern matching algorithms can be classified into two-phase algorithms and one-phase algorithms. While the two-phase algorithms (e.g., ${\tt TwigStack}$) suffer from expensive merging cost, the one-phase algorithms (e.g., ${\tt TwigList}$, ${\tt Twig^{2}Stack}$, ${\tt HolisticTwigStack}$) either lack efficient filtering of useless elements, or use over-complicated data structures. In this paper, we present two novel one-phase holistic twig matching algorithms, TwigMixand ${\tt TwigFast}$, which combine the efficient selection of useful elements (introduced in ${\tt TwigStack}$) with the simple lists for storing final solutions (introduced in ${\tt TwigList}$). ${\tt TwigMix}$ simply introduces the element selection function of ${\tt TwigStack}$ into ${\tt TwigList}$ to avoid manipulation of useless elements in the stack and lists. ${\tt TwigFast}$ further improves this by introducing some pointers in the lists to completely avoid the use of stacks. Our experiments show ${\tt TwigMix}$ significantly and consistently outperforms ${\tt TwigList}$ and ${\tt HolisticTwigStack}$ (up to several times faster), and ${\tt TwigFast}$ is up to two times faster than ${\tt TwigMix}$.