<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>TToowwaarrddss CCoosstt--bbaasseedd OOppttiimmiizzaattiioonnss ooff TTwwiigg CCoonntteenntt--bbaasseedd QQuueerriieess</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Extended Abstract</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Michal Kar ́tky ́, Radim Bcaaˇ Michal Kr ́atky ́ and Radim Baˇca Department of Computer Science, Technical University of Ostrava Department of Computer SciCenzceec</institution>
          ,
          <addr-line>hVRS</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>dmiuc1h5a</institution>
          ,
          <addr-line>l7.0k8ra3t3kyO,srtaradviam-.Pboarcuab</addr-line>
        </aff>
      </contrib-group>
      <fpage>71</fpage>
      <lpage>73</lpage>
      <abstract>
        <p>V. Sn´aˇsel, K. Richta, J. Pokorny´ (Eds.): Dateso 2008, pp. 71-73, ISBN 978-80-248-1746-0.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        In recent years, many approaches to indexing XML data have appeared. These
approaches attempt to process XML queries efficiently and sufficient query plans
are built for this purpose. Some effort has been expended in the optimization of
XML query processing [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ].
      </p>
      <p>
        There are not many works that take cost-based query optimizations into
account. In work [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ], we nfid some cost-based considerations, however, they
work only with one type of structural join and one type of underlying index.
There are works depicted two types of query processing as well [
        <xref ref-type="bibr" rid="ref10 ref17">10, 17</xref>
        ]. The rfist
type applies an element-based index, the second type applies a navigation in a
persistent DOM-like structure. In our work, we propose usage of two path-based
indices that provide significant potential for a query optimization based on a
cost-based join selection.
      </p>
      <p>
        We can identify some classes of approaches for efficient processing of XML
queries. The first class includes approaches based on shredding [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] (storing an
XML document in many relations, where each element name has its own
relation). These approaches work well only on specicfi documents with a defined
XML schema. The second class of approaches [
        <xref ref-type="bibr" rid="ref1 ref15 ref21">15, 21, 1</xref>
        ] provides an
elementbased decomposition of an XML document. These methods usually work with a
labeling scheme and they differ mainly in various join algorithms.
      </p>
      <p>
        We identify two main types of join algorithms. The rfist join type works with
sorted node sets merged by a type of holistic join [
        <xref ref-type="bibr" rid="ref3 ref4">3, 4</xref>
        ]. This kind of structural
join is optimal when a small number of nodes is rejected during the structural
join. In this case, nodes are retrieved in a very efficient way with a small number
of I/O. In our article, this kind of join operation is called a merge join. Another
type of join algorithm is based on context nodes [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], where each location step is
processed using context nodes from the previous step. We say that this approach
utilizes a previously processed location step and uses the nodes for an efficient
search of nodes in the next step. If there is a large number of rejected nodes in
the join operation, this kind of join is efficient. In our article, this kind of join
operation is called a progressive join.
      </p>
      <p>There are approaches that decompose XML documents according to the node
path, as opposed to the node name. Handling the paths during a query processing</p>
      <p>
        Michal Kr´atky´ and Radim Baˇca
provides some advantages. If the a/b/c//e/f/g simple-path query is considered,
then the query is evaluated by vfie structural joins. The evaluation may be very
inefficient compared to path-based approaches [
        <xref ref-type="bibr" rid="ref11 ref13 ref14 ref16 ref19 ref6">16, 19, 6, 14, 13, 11</xref>
        ] and
summarizing approaches [
        <xref ref-type="bibr" rid="ref7 ref8">8, 7</xref>
        ], even when an additional optimization of structural joins
is used [
        <xref ref-type="bibr" rid="ref12 ref3 ref4">4, 3, 12</xref>
        ]. The path-based approaches perform these queries by finding
matched labelled paths – a relatively simple task – and then finding relevant
nodes with a single index search [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. Since there is a significantly lower number
of labelled paths than nodes in an XML document, the search can be performed
very quickly. Supposing there is a set of matched labelled paths, we nfiish the
simple-path query process by nfiding nodes corresponding to those labelled paths
in an inverted list. In work [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], we find a comparison of different decomposition
approaches and a labelled-path approach (Prexfi-Path streaming in this case)
has good experimental results.
      </p>
      <p>In the case of path-based approaches, we can observe the same issue as in
the case of element-based approaches. When we join two path results, we can
perform it with two different types of joins. One join is based on an inverted
index and the second one utilizes the previous query path result.</p>
      <p>
        Chen et al. in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] compares two path-based approaches to processing twig
queries. Whereas the rfist index, ROOTPATHS index, is able to process twig
queries only with the merge join, the second index, DATAPATHS index, is able
to process a query path by utilizing previous query path results. Consequently,
DATAPATHS index applies a progressive join algorithm. These indices can
outperform each other depending on the query. However, there is no general
proposal that can help to decide that the index should be used to achieve the best
query evaluation performance. In works [
        <xref ref-type="bibr" rid="ref13 ref14">13, 14</xref>
        ], we have introduced an index to
provide these join operations.
      </p>
      <p>
        In work [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], we introduce a simple, cost-based, optimization technique for a
join selection during a query evaluation. This technique joins the advantages of
a simple path query processing based on inverted lists and usage of previous
results for a twig query processing. We show that the knowledge of the result
size can help to choose a good query evaluation strategy. We utilize advantages
of existing, state-of-the-art, path-based approaches, such as [
        <xref ref-type="bibr" rid="ref16 ref19 ref6">16, 19, 6</xref>
        ], to achieve
an optimal query performance.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>S.</given-names>
            <surname>Al-Khalifa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. V.</given-names>
            <surname>Jagadish</surname>
          </string-name>
          , and
          <string-name>
            <given-names>N.</given-names>
            <surname>Koudas</surname>
          </string-name>
          .
          <article-title>Structural Joins: A Primitive for Efficient XML Query Pattern Matching</article-title>
          .
          <source>In Proceedings of International Conference on Data Engineering</source>
          ,
          <string-name>
            <surname>ICDE</surname>
          </string-name>
          <year>2002</year>
          . IEEE Computer Society,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>R.</given-names>
            <surname>Bcaaˇ and M. Kar</surname>
          </string-name>
          <article-title>´tky´. A Cost-based Join Selection for XML Twig Contentbased Queries</article-title>
          .
          <source>In Proceedings of the Third International Workshop on Database Technologies for Handling XML Information on the Web, DataX</source>
          <year>2008</year>
          , EDBT, Nantes, France. Accepted, to appear
          <source>in ACM DL</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>N.</given-names>
            <surname>Bruno</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Srivastava</surname>
          </string-name>
          , and
          <string-name>
            <given-names>N.</given-names>
            <surname>Koudas</surname>
          </string-name>
          .
          <article-title>Holistic Twig Joins: Optimal XML Pattern Matching</article-title>
          .
          <source>In Proceedings of the ACM International Conference on Management of Data, SIGMOD 2002</source>
          , pages
          <fpage>310</fpage>
          -
          <lpage>321</lpage>
          . ACM Press,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>S.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.-G.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Tatemura</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.-P.</given-names>
            <surname>Hsiung</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Agrawal</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K. S.</given-names>
            <surname>Candan</surname>
          </string-name>
          . Twig2Stack:
          <article-title>Bottom-up Processing of Generalized-tree-pattern Queries Over XML documents</article-title>
          .
          <source>In Proceedings of International Conference on Very Large Databases, VLDB 2006</source>
          , pages
          <fpage>283</fpage>
          -
          <lpage>294</lpage>
          . VLDB Endowment,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>T.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lu</surname>
          </string-name>
          , and
          <string-name>
            <given-names>T.</given-names>
            <surname>Ling</surname>
          </string-name>
          .
          <article-title>On Boosting Holism in XML Twig Pattern Matching Using Structural Indexing Techniques</article-title>
          .
          <source>Proceedings of the ACM International Conference on Management of Data, SIGMOD 2005</source>
          , pages
          <fpage>455</fpage>
          -
          <lpage>466</lpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Z.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Korn</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Koudas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Shanmugasundaram</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Srivastava</surname>
          </string-name>
          .
          <article-title>Index Structures for Matching XML Twigs Using Relational Query Processors</article-title>
          .
          <source>In Proceedings of ICDE 2005</source>
          , pages
          <fpage>1273</fpage>
          -
          <lpage>1273</lpage>
          . IEEE Computer Society,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>C.-W. Chung</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.-K. Min</surname>
            , and
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Shim</surname>
          </string-name>
          .
          <article-title>APEX: an Adaptive Path Index for XML Data</article-title>
          .
          <source>In Proceedings of the ACM International Conference on Management of Data, SIGMOD 2002</source>
          , pages
          <fpage>121</fpage>
          -
          <lpage>132</lpage>
          , New York, NY, USA,
          <year>2002</year>
          . ACM Press.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>B.</given-names>
            <surname>Cooper</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Sample</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. J.</given-names>
            <surname>Franklin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. R.</given-names>
            <surname>Hjaltason</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M.</given-names>
            <surname>Shadmon</surname>
          </string-name>
          .
          <article-title>A Fast Index for Semistructured Data</article-title>
          .
          <source>In Proceedings of the 27th International Conference on Very Large Databases, VLDB 2001</source>
          , pages
          <fpage>341</fpage>
          -
          <lpage>350</lpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>T.</given-names>
            <surname>Grust</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. van Keulen</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>J.</given-names>
            <surname>Teubner</surname>
          </string-name>
          . Staircase Join:
          <article-title>Teach a Relational DBMS to Watch Its (Axis) Steps</article-title>
          .
          <source>In Proceedings of the 29th, International Conference on Very Large Databases, VLDB 2003</source>
          , pages
          <fpage>524</fpage>
          -
          <lpage>535</lpage>
          . VLDB Endowment,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>A.</given-names>
            <surname>Halverson</surname>
          </string-name>
          and et al. Mixed
          <string-name>
            <surname>Mode XML Query</surname>
          </string-name>
          <article-title>Processing</article-title>
          .
          <source>In Proceedings of VLDB 2003</source>
          , pages
          <fpage>225</fpage>
          -
          <lpage>236</lpage>
          . VLDB Endowment,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>W. H. Hanyu Li</surname>
            ,
            <given-names>Mong Li</given-names>
          </string-name>
          <string-name>
            <surname>Lee</surname>
          </string-name>
          .
          <article-title>A Path-Based Labeling Scheme for Ecffiient Structural Join</article-title>
          .
          <source>In Proceedings of XSym 2005</source>
          , pages
          <fpage>34</fpage>
          -
          <lpage>48</lpage>
          . Springer-Verlag,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12. H.
          <string-name>
            <surname>Jiang</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Lu</surname>
            , and
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Yu</surname>
          </string-name>
          .
          <article-title>Holistic twig joins on indexed XML documents</article-title>
          .
          <source>Proceedings of VLDB 2003</source>
          , pages
          <fpage>273</fpage>
          -
          <lpage>284</lpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13. M. Kar´tky´, R. Bcaaˇ, and V. Snsaeˇ´l.
          <article-title>Implementation of XPath Axes in the Multidimensional Approach to Indexing XML Data</article-title>
          .
          <source>In Proceedings of DEXA</source>
          <year>2007</year>
          , volume LNCS 4653/
          <year>2007</year>
          . Springer-Verlag,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14. M. Kar´tky´, J. Pokorny´, and
          <string-name>
            <surname>V.</surname>
          </string-name>
          <article-title>Snsaeˇ´l. Implementation of XPath Axes in the Multidimensional Approach to Indexing XML Data. In Current Trends in Database Technology</article-title>
          ,
          <string-name>
            <surname>EDBT</surname>
          </string-name>
          <year>2004</year>
          , volume LNCS 3268/
          <year>2004</year>
          . Springer-Verlag,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>Q.</given-names>
            <surname>Li</surname>
          </string-name>
          and
          <string-name>
            <given-names>B.</given-names>
            <surname>Moon</surname>
          </string-name>
          .
          <article-title>Indexing and Querying XML Data for Regular Path Expressions</article-title>
          .
          <source>In Proceedings of VLDB</source>
          <year>2001</year>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>T. S. M. Yoshikawa</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Amagasa</surname>
            and
            <given-names>S. Uemura.</given-names>
          </string-name>
          <article-title>XRel: a Path-based Approach to Storage and Retrieval of XML Documents Using Relational Databases</article-title>
          .
          <source>ACM Trans. Inter. Tech.</source>
          ,
          <volume>1</volume>
          (
          <issue>1</issue>
          ):
          <fpage>110</fpage>
          -
          <lpage>141</lpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17. N. May,
          <string-name>
            <given-names>M.</given-names>
            <surname>Brantner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A</given-names>
            . Bo¨hm, C.-
            <surname>C. Kanne</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Moerkotte</surname>
          </string-name>
          .
          <article-title>Index vs. Navigation in XPath Evaluation</article-title>
          .
          <source>In Proceedings of Database and XML Technologies</source>
          ,
          <year>XSym 2006</year>
          , volume LNCS 4156/
          <year>2006</year>
          , pages
          <fpage>16</fpage>
          -
          <lpage>30</lpage>
          . Springer-Verlag,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>J. Shanmugasundaram</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Tufte</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Zhang</surname>
            , G. He,
            <given-names>D.</given-names>
          </string-name>
          <article-title>DeWitt, and</article-title>
          <string-name>
            <given-names>J.</given-names>
            <surname>Naughton</surname>
          </string-name>
          .
          <article-title>Relational Databases for Querying XML Documents: Limitations and Opportunities</article-title>
          .
          <source>In Proceedings of the 25th International Conference on Very Large Databases</source>
          ,
          <string-name>
            <surname>VLDB</surname>
          </string-name>
          <year>1999</year>
          . Edinburgh, Scotland, UK, pages
          <fpage>302</fpage>
          -
          <lpage>314</lpage>
          . Morgan Kaufmann,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <given-names>S. S.</given-names>
            <surname>Prakas</surname>
          </string-name>
          and
          <string-name>
            <surname>S.Madria. SUCXENT:</surname>
          </string-name>
          <article-title>An Ecffiient Path-Based Approach to Store and Query XML Documents</article-title>
          .
          <source>In Proceedings of DEXA</source>
          <year>2004</year>
          , volume LNCS 3180/
          <year>2004</year>
          , pages
          <fpage>285</fpage>
          -
          <lpage>295</lpage>
          . Springer-Verlag,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. M.</given-names>
            <surname>Patel</surname>
          </string-name>
          , and
          <string-name>
            <given-names>H.</given-names>
            <surname>Jagadish</surname>
          </string-name>
          .
          <article-title>Structural Join Order Selection for XML Query Optimization</article-title>
          .
          <source>In Proceedings of ICDE 2003. IEEE CS</source>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <given-names>C.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Naughton</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>DeWitt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Q.</given-names>
            <surname>Luo</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Lohman</surname>
          </string-name>
          .
          <article-title>On Supporting Containment Queries in Relational Database Management Systems</article-title>
          .
          <source>In Proceedings of ACM SIGMOD</source>
          <year>2001</year>
          , pages
          <fpage>425</fpage>
          -
          <lpage>436</lpage>
          , New York, USA,
          <year>2001</year>
          . ACM Press.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>