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

Efficient Evaluation and Static Analysis for Well-Designed Pattern Trees with Projection

Published: 21 August 2018 Publication History

Abstract

Conjunctive queries (CQs) fail to provide an answer when the pattern described by the query does not exactly match the data. CQs might thus be too restrictive as a querying mechanism when data is semistructured or incomplete. The semantic web therefore provides a formalism—known as (projected) well-designed pattern trees (pWDPTs)—that tackles this problem: pWDPTs allow us to formulate queries that match parts of the query over the data if available, but do not ignore answers of the remaining query otherwise. Here we abstract away the specifics of semantic web applications and study pWDPTs over arbitrary relational schemas. Since the language of pWDPTs subsumes CQs, their evaluation problem is intractable. We identify structural properties of pWDPTs that lead to (fixed-parameter) tractability of various variants of the evaluation problem. We also show that checking if a pWDPT is equivalent to one in our tractable class is in 2EXPTIME. As a corollary, we obtain fixed-parameter tractability of evaluation for pWDPTs with such good behavior. Our techniques also allow us to develop a theory of approximations for pWDPTs.

Supplementary Material

a8-barcelo-apndx.pdf (barcelo.zip)
Supplemental movie, appendix, image and software files for, Efficient Evaluation and Static Analysis forWell-DesignedPattern Trees with Projection

References

[1]
Isolde Adler, Georg Gottlob, and Martin Grohe. 2007. Hypertree width and related hypergraph invariants. Eur. J. Comb. 28, 8 (2007), 2167--218.
[2]
Shqiponja Ahmetaj, Wolfgang Fischl, Reinhard Pichler, Mantas Simkus, and Sebastian Skritek. 2015. Towards reconciling SPARQL and certain answers. In Proceedings of the 24th International Conference on World Wide Web (WWW’15). ACM, 23--33.
[3]
Marcelo Arenas, Gonzalo I. Diaz, and Egor V. Kostylev. 2016. Reverse engineering SPARQL queries. In Proceedings of the 25th International Conference on World Wide Web (WWW’16). ACM, 239--249.
[4]
Marcelo Arenas and Jorge Pérez. 2011. Querying semantic web data with SPARQL. In Proceedings of the 30th ACM Symposium on Principles of Database Systems (PODS’11). ACM, 305--316.
[5]
Marcelo Arenas and Martín Ugarte. 2016. Designing a query language for RDF: Marrying open and closed worlds. In Proceedings of the 35th ACM Symposium on Principles of Database Systems (PODS’16). ACM, 225--236.
[6]
Pablo Barceló, Leonid Libkin, and Miguel Romero. 2014. Efficient approximations of conjunctive queries. SIAM J. Comput. 43, 3 (2014), 1085--1130.
[7]
Pablo Barceló, Reinhard Pichler, and Sebastian Skritek. 2015. Efficient evaluation and approximation of well-designed pattern trees. In Proceedings of the 34th ACM Symposium on Principles of Database Systems (PODS’15). ACM, 131--144.
[8]
Pablo Barceló, Andreas Pieris, and Miguel Romero. 2017. Semantic optimization in tractable classes of conjunctive queries. SIGMOD Record 46, 2 (2017), 5--17.
[9]
Pablo Barceló, Miguel Romero, and Moshe Y. Vardi. 2014. Does query evaluation tractability help query containment? In Proceedings of the 33rd ACM Symposium on Principles of Database Systems (PODS’14). ACM, 188--199.
[10]
Pablo Barceló, Miguel Romero, and Moshe Y. Vardi. 2016. Semantic acyclicity on graph databases. SIAM J. Comput. 45, 4 (2016), 1339--1376.
[11]
Angela Bonifati, Wim Martens, and Thomas Timm. 2017. An analytical study of large SPARQL query logs. PVLDB 11, 2 (2017), 149--161.
[12]
Andrei A. Bulatov, Andrei A. Krokhin, and Benoit Larose. 2008. Dualities for constraint satisfaction problems. In Complexity of Constraints - An Overview of Current Research Themes, Lecture Notes in Computer Science, Vol. 5250. Springer, 93--124.
[13]
Ashok K. Chandra and Philip M. Merlin. 1977. Optimal implementation of conjunctive queries in relational data bases. In Proceedings of the 9th Annual ACM Symposium on Theory of Computing. ACM, 77--90.
[14]
Chandra Chekuri and Anand Rajaraman. 2000. Conjunctive query containment revisited. Theor. Comput. Sci. 239, 2 (2000), 211--229.
[15]
Stephen A. Cook and Pierre McKenzie. 1987. Problems complete for deterministic logarithmic space. J. Algorithms 8, 3 (1987), 385--394.
[16]
Víctor Dalmau, Phokion G. Kolaitis, and Moshe Y. Vardi. 2002. Constraint satisfaction, bounded treewidth, and finite-variable logics. In Proceedings of the 8th International Conference on Principles and Practice of Constraint Programming (CP’02), Lecture Notes in Computer Science, Vol. 2470. Springer, 310--326.
[17]
Rodney G. Downey and Michael R. Fellows. 1999. Parameterized Complexity. Springer, Berlin.
[18]
Ronald Fagin. 1983. Degrees of acyclicity for hypergraphs and relational database schemes. J. ACM 30, 3 (1983), 514--550.
[19]
Wolfgang Fischl, Georg Gottlob, and Reinhard Pichler. 2016. General and fractional hypertree decompositions: Hard and easy cases. CoRR abs/1611.01090 (2016).
[20]
Jörg Flum and Martin Grohe. 2010. Parameterized Complexity Theory. Texts in Theoretical Computer Science. An EATCS Series. Springer, 1--495.
[21]
Georg Gottlob, Gianluigi Greco, Nicola Leone, and Francesco Scarcello. 2016. Hypertree decompositions: Questions and answers. In Proceedings of the 35th ACM Symposium on Principles of Database Systems (PODS’16). PODS, 57--74.
[22]
Georg Gottlob, Nicola Leone, and Francesco Scarcello. 2001. The complexity of acyclic conjunctive queries. J. ACM 48, 3 (2001), 431--498.
[23]
Georg Gottlob, Nicola Leone, and Francesco Scarcello. 2002. Hypertree decompositions and tractable queries. J. Comput. Syst. Sci. 64, 3 (2002), 579--627.
[24]
Georg Gottlob, Zoltán Miklós, and Thomas Schwentick. 2009. Generalized hypertree decompositions: NP-hardness and tractable variants. J. ACM 56, 6 (2009), 30:1--30:32.
[25]
Georg Gottlob and Reinhard Pichler. 2004. Hypergraphs in model checking: Acyclicity and hypertree-width versus clique-width. SIAM J. Comput. 33, 2 (2004), 351--378.
[26]
Martin Grohe. 2007. The complexity of homomorphism and constraint satisfaction problems seen from the other side. J. ACM 54, 1 (2007), 1:1--1:24.
[27]
Martin Grohe and Dániel Marx. 2014. Constraint solving via fractional edge covers. ACM Trans. Algorithms 11, 1 (2014), 4:1--4:20.
[28]
Martin Grohe, Thomas Schwentick, and Luc Segoufin. 2001. When is the evaluation of conjunctive queries tractable? In Proceedings of the 33rd Annual ACM Symposium on Theory of Computing. ACM, 657--666.
[29]
Mark Kaminski and Egor V. Kostylev. 2016. Beyond well-designed SPARQL. In Proceedings of the 19th International Conference on Database Theory (ICDT’16) (LIPIcs), Vol. 48. Schloss Dagstuhl—Leibniz-Zentrum fuer Informatik, 5:1--5:18.
[30]
Markus Kröll, Reinhard Pichler, and Sebastian Skritek. 2016. On the complexity of enumerating the answers to well-designed pattern trees. In Proceedings of the19th International Conference on Database Theory (ICDT’16) (LIPIcs), Vol. 48. 22:1--22:18.
[31]
Andrés Letelier, Jorge Pérez, Reinhard Pichler, and Sebastian Skritek. 2013. Static analysis and optimization of semantic web queries. ACM Trans. Database Syst. 38, 4 (2013), 25:1--25:45.
[32]
Dániel Marx. 2013. Tractable hypergraph properties for constraint satisfaction and conjunctive queries. J. ACM 60, 6 (2013), 42:1--42:51.
[33]
MongoDB. 2017. MongoDB. Retrieved August 07, 2018 from https://www.mongodb.com/.
[34]
Neo4j. 2017. Cypher - Graph Query Language. Retrieved August 07, 2018 from http://neo4j.com/developer/cypher-query-language/.
[35]
Christos H. Papadimitriou and Mihalis Yannakakis. 1999. On the complexity of database queries. J. Comput. Syst. Sci. 58, 3 (1999), 407--427.
[36]
Jorge Pérez, Marcelo Arenas, and Claudio Gutierrez. 2009. Semantics and complexity of SPARQL. ACM Trans. Database Syst. 34, 3 (2009), 16:1--16:45.
[37]
François Picalausa and Stijn Vansummeren. 2011. What are real SPARQL queries like? In Proceedings of the International Workshop on Semantic Web Information Management (SWIM’11). ACM, 7.
[38]
Reinhard Pichler and Sebastian Skritek. 2014. Containment and equivalence of well-designed SPARQL. In Proceedings of the 33rd ACM Symposium on Principles of Database Systems (PODS’14). ACM, 39--50.
[39]
Eric Prud′hommeaux and Andy Seaborne. 2008. SPARQL Query Language for RDF. W3C Recommendation. W3C. Retrieved August 07, 2018 from http://www.w3.org/TR/rdf-sparql-query.
[40]
Miguel Romero. 2018. The tractability frontier of well-designed SPARQL queries. In Proceedings of the 37th ACM Symposium on Principles of Database Systems (PODS’18). ACM, 295--306.
[41]
Ivan Hal Sudborough. 1977. Time and tape bounded auxiliary pushdown automata. In Proceedings of the 6th Symposium on Mathematical Foundations of Computer Science (MFCS'77), Vol. 53. Springer, 493--503.
[42]
Ivan Hal Sudborough. 1978. On the tape complexity of deterministic context-free languages. J. ACM 25, 3 (1978), 405--414.
[43]
Mihalis Yannakakis. 1981. Algorithms for acyclic database schemes. In Proceedings of the 7th International Conference on Very Large Data Bases VLDB 1981. IEEE Computer Society, 82--94.
[44]
Xiaowang Zhang, Jan Van den Bussche, and François Picalausa. 2016. On the satisfiability problem for SPARQL patterns. J. Artif. Intell. Res. 56 (2016), 403--428.

Cited By

View all

Index Terms

  1. Efficient Evaluation and Static Analysis for Well-Designed Pattern Trees with Projection

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Transactions on Database Systems
    ACM Transactions on Database Systems  Volume 43, Issue 2
    Best of ICDT 2017 and Regular Papers
    June 2018
    154 pages
    ISSN:0362-5915
    EISSN:1557-4644
    DOI:10.1145/3243648
    Issue’s Table of Contents
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 21 August 2018
    Accepted: 01 June 2018
    Revised: 01 April 2018
    Received: 01 December 2016
    Published in TODS Volume 43, Issue 2

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. RDF
    2. SPARQL
    3. approximations
    4. containment
    5. hyper-treewidth
    6. query answering
    7. subsumption
    8. treewidth
    9. well-designed pattern trees

    Qualifiers

    • Research-article
    • Research
    • Refereed

    Funding Sources

    • FWF project
    • Fondecyt
    • Vienna Science and Technology Fund (WWTF)
    • Millenium Institute for Foundational Research on Data
    • Austrian Science Fund (FWF)

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

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

    Other Metrics

    Citations

    Cited By

    View all

    View Options

    Get Access

    Login options

    Full Access

    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