skip to main content
research-article

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

Published:21 August 2018Publication History
Skip Abstract Section

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.

Skip Supplemental Material Section

Supplemental Material

References

  1. Isolde Adler, Georg Gottlob, and Martin Grohe. 2007. Hypertree width and related hypergraph invariants. Eur. J. Comb. 28, 8 (2007), 2167--218. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Pablo Barceló, Leonid Libkin, and Miguel Romero. 2014. Efficient approximations of conjunctive queries. SIAM J. Comput. 43, 3 (2014), 1085--1130.Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Pablo Barceló, Andreas Pieris, and Miguel Romero. 2017. Semantic optimization in tractable classes of conjunctive queries. SIGMOD Record 46, 2 (2017), 5--17. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Pablo Barceló, Miguel Romero, and Moshe Y. Vardi. 2016. Semantic acyclicity on graph databases. SIAM J. Comput. 45, 4 (2016), 1339--1376.Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Angela Bonifati, Wim Martens, and Thomas Timm. 2017. An analytical study of large SPARQL query logs. PVLDB 11, 2 (2017), 149--161. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Chandra Chekuri and Anand Rajaraman. 2000. Conjunctive query containment revisited. Theor. Comput. Sci. 239, 2 (2000), 211--229. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Stephen A. Cook and Pierre McKenzie. 1987. Problems complete for deterministic logarithmic space. J. Algorithms 8, 3 (1987), 385--394. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Rodney G. Downey and Michael R. Fellows. 1999. Parameterized Complexity. Springer, Berlin. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Ronald Fagin. 1983. Degrees of acyclicity for hypergraphs and relational database schemes. J. ACM 30, 3 (1983), 514--550. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Wolfgang Fischl, Georg Gottlob, and Reinhard Pichler. 2016. General and fractional hypertree decompositions: Hard and easy cases. CoRR abs/1611.01090 (2016).Google ScholarGoogle Scholar
  20. Jörg Flum and Martin Grohe. 2010. Parameterized Complexity Theory. Texts in Theoretical Computer Science. An EATCS Series. Springer, 1--495. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Georg Gottlob, Nicola Leone, and Francesco Scarcello. 2001. The complexity of acyclic conjunctive queries. J. ACM 48, 3 (2001), 431--498. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Georg Gottlob, Nicola Leone, and Francesco Scarcello. 2002. Hypertree decompositions and tractable queries. J. Comput. Syst. Sci. 64, 3 (2002), 579--627. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Martin Grohe and Dániel Marx. 2014. Constraint solving via fractional edge covers. ACM Trans. Algorithms 11, 1 (2014), 4:1--4:20. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Dániel Marx. 2013. Tractable hypergraph properties for constraint satisfaction and conjunctive queries. J. ACM 60, 6 (2013), 42:1--42:51. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. MongoDB. 2017. MongoDB. Retrieved August 07, 2018 from https://www.mongodb.com/.Google ScholarGoogle Scholar
  34. Neo4j. 2017. Cypher - Graph Query Language. Retrieved August 07, 2018 from http://neo4j.com/developer/cypher-query-language/.Google ScholarGoogle Scholar
  35. Christos H. Papadimitriou and Mihalis Yannakakis. 1999. On the complexity of database queries. J. Comput. Syst. Sci. 58, 3 (1999), 407--427. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  42. Ivan Hal Sudborough. 1978. On the tape complexity of deterministic context-free languages. J. ACM 25, 3 (1978), 405--414. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

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

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • 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

      Copyright © 2018 ACM

      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: 1 June 2018
      • Revised: 1 April 2018
      • Received: 1 December 2016
      Published in tods Volume 43, Issue 2

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article
      • Research
      • Refereed

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader