Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Optimizing Tree Patterns for Querying Graph- and Tree-Structured Data

Published: 12 May 2017 Publication History

Abstract

Many of today's graph query languages are based on graph pattern matching. We investigate optimization for treeshaped patterns with transitive closure. Such patterns are quite expressive, yet can be evaluated efficiently. The minimization problem aims at reducing the number of nodes in patterns and goes back to the early 2000's. We provide an example showing that, in contrast to earlier claims, tree patterns cannot be minimized by deleting nodes only. The example resolves the M ?/= NR problem, which asks if a tree pattern is minimal if and only if it is nonredundant. The example can be adapted to also understand the complexity of minimization, which was another question that was open since the early research on the problem. Interestingly, the latter result also shows that, unless standard complexity assumptions are false, more general approaches for minimizing tree patterns are also bound to fail in some cases.

References

[1]
S. Abiteboul, L. Segoufin, and V. Vianu. Static analysis of active XML systems. ACM Trans. Database Syst., 34(4), 2009.
[2]
S. Amer-Yahia, S. Cho, L. V. S. Lakshmanan, and D. Srivastava. Tree pattern query minimization. VLDB J., 11(4):315--331, 2002.
[3]
R. Angles, M. Arenas, P. Barceló, A. Hogan, J. L. Reutter, and D. Vrgoc. Foundations of modern graph query languages. CoRR, abs/1610.06264, 2016.
[4]
M. Arenas, P. Barceló, L. Libkin, and F. Murlak. Foundations of Data Exchange. Cambridge University Press, 2014.
[5]
M. Arenas, S. Conca, and J. Pérez. Counting beyond a yottabyte, or how SPARQL 1.1 property paths will prevent adoption of the standard. In World Wide Web Conference (WWW), pages 629--638, 2012.
[6]
P. Barceló, L. Libkin, A. Poggi, and C. Sirangelo. XML with incomplete information. J. ACM, 58(1):4, 2010.
[7]
M. Benedikt, W. Fan, and F. Geerts. XPath satisfiability in the presence of DTDs. J. ACM, 55(2), 2008.
[8]
H. Björklund, W. Martens, and T. Schwentick. Conjunctive query containment over trees. J. Comput. Syst. Sci., 77(3):450--472, 2011.
[9]
H. Björklund, W. Martens, and T. Schwentick. Validity of tree pattern queries with respect to schema information. In International Symposium on Mathematical Foundations of Computer Science (MFCS), pages 171--182, 2013.
[10]
A. K. Chandra and P. M. Merlin. Optimal implementation of conjunctive queries in relational data bases. In Symposium on Theory of Computing (STOC), pages 77--90, 1977.
[11]
D. Chen and C. Y. Chan. Minimization of tree pattern queries with constraints. In International Conference on Management of Data (SIGMOD), pages 609--622, 2008.
[12]
W. Czerwinski, W. Martens, M. Niewerth, and P. Parys. Minimization of tree pattern queries. In Symposium on Principles of Database Systems (PODS), pages 43--54, 2016.
[13]
W. Czerwinski, W. Martens, P. Parys, and M. Przyby lko. The (almost) complete guide to tree pattern containment. In Symposium on Principles of Database Systems (PODS), pages 117--130, 2015.
[14]
S. Flesca, F. Furfaro, and E. Masciari. On the minimization of XPath queries. In International Conference on Very Large Data Bases (VLDB), pages 153--164, 2003.
[15]
S. Flesca, F. Furfaro, and E. Masciari. On the minimization of XPath queries. J. ACM, 55(1), 2008.
[16]
A. Gheerbrant, L. Libkin, and C. Sirangelo. Reasoning about pattern-based XML queries. In International Conference on Web Reasoning and Rule Systems (RR), pages 4--18, 2013.
[17]
G. Gottlob, G. Greco, N. Leone, and F. Scarcello. Hypertree decompositions: Questions and answers. In Symposium on Principles of Database Systems (PODS), pages 57--74, 2016.
[18]
G. Gottlob, C. Koch, and K. U. Schulz. Conjunctive queries over trees. J. ACM, 53(2):238--272, 2006.
[19]
Gremlin Language. github.com/tinkerpop/gremlin/wiki, 2013.
[20]
jsonpath.com/, January 2017.
[21]
M. Kay. XSL Transformations (XSLT) version 3.0. Technical report, World Wide Web Consortium, November 2015. W3C Recommendation, www.w3.org/TR/2015/CR-xslt-30-20151119/.
[22]
B. Kimelfeld and Y. Sagiv. Revisiting redundancy and minimization in an XPath fragment. In International Conference on Extending Database Technology (EDBT), pages 61--72, 2008.
[23]
K. Losemann and W. Martens. The complexity of regular expressions and property paths in SPARQL. ACM Trans. Database Syst., 38(4):24, 2013.
[24]
G. Miklau and D. Suciu. Containment and equivalence for a fragment of XPath. J. ACM, 51(1):2--45, 2004.
[25]
The Cypher query language. neo4j.com/docs/developer-manual/current/cypher/, 2016.
[26]
F. Neven and T. Schwentick. On the complexity of XPath containment in the presence of disjunction, DTDs, and variables. Logical Methods in Computer Science, 2(3), 2006.
[27]
P. Ramanan. Efficient algorithms for minimizing tree pattern queries. In International Conference on Management of Data (SIGMOD), pages 299--309, 2002.
[28]
J. Robie, D. Chamberlin, M. Dyck, and J. Snelson. XML Path Language 3.0. Technical report, World Wide Web Consortium, April 2014. www.w3.org/TR/2014/REC-xpath-30-20140408/.
[29]
J. Robie, D. Chamberlin, M. Dyck, and J. Snelson. XQuery 3.0: An XML query language. Technical report, World Wide Web Consortium, April 2014. W3C Recommendation, www.w3.org/TR/2014/REC-xquery-30-20140408/.
[30]
I. Robinson, J. Webber, and E. Eifrem. Graph Databases. O'Reilly, 2 edition, 2015.
[31]
M. A. Rodriguez. The Gremlin graph traversal machine and language (invited talk). In Symposium on Database Programming Languages (DBPL), pages 1--10, 2015.
[32]
S. Staworko and P. Wieczorek. Characterizing XML twig queries with examples. In International Conference on Database Theory (ICDT), pages 144--160, 2015.
[33]
SPARQL 1.1 query language. www.w3.org/TR/sparql11-query/. World Wide Web Consortium.
[34]
Wikidata sparql query service examples. www.wikidata.org/wiki/Wikidata: SPARQL_query_service/queries/examples.
[35]
P. T. Wood. Minimising simple XPath expressions. In WebDB, pages 13--18, 2001.
[36]
W. Xu and Z. M. Özsoyoglu. Rewriting XPath queries using materialized views. In International Conference on Very

Cited By

View all
  1. Optimizing Tree Patterns for Querying Graph- and Tree-Structured Data

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGMOD Record
    ACM SIGMOD Record  Volume 46, Issue 1
    March 2017
    46 pages
    ISSN:0163-5808
    DOI:10.1145/3093754
    Issue’s Table of Contents

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 12 May 2017
    Published in SIGMOD Volume 46, Issue 1

    Check for updates

    Qualifiers

    • Research-article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)3
    • Downloads (Last 6 weeks)2
    Reflects downloads up to 07 Nov 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Multi-model query languages: taming the variety of big dataDistributed and Parallel Databases10.1007/s10619-023-07433-142:1(31-71)Online publication date: 1-Mar-2024
    • (2019)Complexity of Conjunctive Regular Path Query HomomorphismsComputing with Foresight and Industry10.1007/978-3-030-22996-2_10(108-119)Online publication date: 15-Jul-2019
    • (2018)A Survey on NoSQL StoresACM Computing Surveys10.1145/315866151:2(1-43)Online publication date: 17-Apr-2018
    • (2017)Optimizing tree pattern queries: why cutting is not enough (invited talk)Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing10.1145/3055399.3079076(3-3)Online publication date: 19-Jun-2017

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media