Direct Access for Conjunctive Queries with Negations

Authors Florent Capelli , Oliver Irwin



PDF
Thumbnail PDF

File

LIPIcs.ICDT.2024.13.pdf
  • Filesize: 0.95 MB
  • 20 pages

Document Identifiers

Author Details

Florent Capelli
  • Univ. Artois, CNRS, UMR 8188, Centre de Recherche en Informatique de Lens (CRIL), F-62300 Lens, France
Oliver Irwin
  • Université de Lille, CNRS, Inria, UMR 9189 - CRIStAL, F-59000 Lille, France

Acknowledgements

We are thankful to Stefan Mengel and Sylvain Salvati for helpful discussions while elaborating these results.

Cite AsGet BibTex

Florent Capelli and Oliver Irwin. Direct Access for Conjunctive Queries with Negations. In 27th International Conference on Database Theory (ICDT 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 290, pp. 13:1-13:20, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)
https://doi.org/10.4230/LIPIcs.ICDT.2024.13

Abstract

Given a conjunctive query Q and a database 𝐃, a direct access to the answers of Q over 𝐃 is the operation of returning, given an index j, the j-th answer for some order on its answers. While this problem is #P-hard in general with respect to combined complexity, many conjunctive queries have an underlying structure that allows for a direct access to their answers for some lexicographical ordering that takes polylogarithmic time in the size of the database after a polynomial time precomputation. Previous work has precisely characterised the tractable classes and given fine-grained lower bounds on the precomputation time needed depending on the structure of the query. In this paper, we generalise these tractability results to the case of signed conjunctive queries, that is, conjunctive queries that may contain negative atoms. Our technique is based on a class of circuits that can represent relational data. We first show that this class supports tractable direct access after a polynomial time preprocessing. We then give bounds on the size of the circuit needed to represent the answer set of signed conjunctive queries depending on their structure. Both results combined together allow us to prove the tractability of direct access for a large class of conjunctive queries. On the one hand, we recover the known tractable classes from the literature in the case of positive conjunctive queries. On the other hand, we generalise and unify known tractability results about negative conjunctive queries - that is, queries having only negated atoms. In particular, we show that the class of β-acyclic negative conjunctive queries and the class of bounded nest set width negative conjunctive queries admit tractable direct access.

Subject Classification

ACM Subject Classification
  • Information systems → Relational database model
Keywords
  • Conjunctive queries
  • factorized databases
  • direct access
  • hypertree decomposition

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Guillaume Bagan. Algorithmes et complexité des problèmes d’énumération pour l’évaluation de requêtes logiques. (Algorithms and complexity of enumeration problems for the evaluation of logical queries). PhD thesis, University of Caen Normandy, France, 2009. URL: https://tel.archives-ouvertes.fr/tel-00424232.
  2. Guillaume Bagan, Arnaud Durand, Etienne Grandjean, and Frédéric Olive. Computing the jth solution of a first-order query. RAIRO-Theoretical Informatics and Applications, 42(1):147-164, 2008. URL: https://doi.org/10.1051/ita:2007046.
  3. Nurzhan Bakibayev, Tomáš Kočiskỳ, Dan Olteanu, and Jakub Závodnỳ. Aggregation and ordering in factorised databases. Proceedings of the VLDB Endowment, 6(14):1990-2001, 2013. URL: https://doi.org/10.14778/2556549.2556579.
  4. Johann Brault-Baron. De la pertinence de l’énumération: complexité en logiques propositionnelle et du premier ordre. PhD thesis, Université de Caen, 2013. URL: https://tel.archives-ouvertes.fr/tel-01081392.
  5. Johann Brault-Baron. Hypergraph acyclicity revisited. ACM Computing Surveys (CSUR), 49(3):1-26, 2016. URL: https://doi.org/10.1145/2983573.
  6. Johann Brault-Baron, Florent Capelli, and Stefan Mengel. Understanding model counting for beta-acyclic CNF-formulas. In 32nd International Symposium on Theoretical Aspects of Computer Science, volume 30 of LIPIcs, pages 143-156. Schloss Dagstuhl, 2015. URL: https://doi.org/10.4230/LIPIcs.STACS.2015.143.
  7. Karl Bringmann, Nofar Carmeli, and Stefan Mengel. Tight fine-grained bounds for direct access on join queries. In Proceedings of the 41st ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, pages 427-436, 2022. URL: https://doi.org/10.1145/3517804.3526234.
  8. Karl Bringmann, Nofar Carmeli, and Stefan Mengel. Tight fine-grained bounds for direct access on join queries. arXiv preprint arXiv:2201.02401, 2022. URL: https://doi.org/10.48550/arXiv.2201.02401.
  9. Florent Capelli. Understanding the complexity of #SAT using knowledge compilation. In 32nd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2017, Reykjavik, Iceland, June 20-23, 2017, pages 1-10. IEEE Computer Society, 2017. URL: https://doi.org/10.1109/LICS.2017.8005121.
  10. Florent Capelli and Oliver Irwin. Direct access for conjunctive queries with negation. CoRR, abs/2310.15800, 2023. URL: https://doi.org/10.48550/arXiv.2310.15800.
  11. Clément Carbonnel, Miguel Romero, and Stanislav Živnỳ. Point-width and max-csps. ACM Transactions on Algorithms (TALG), 16(4):1-28, 2020. URL: https://doi.org/10.1145/3409447.
  12. Nofar Carmeli, Nikolaos Tziavelis, Wolfgang Gatterbauer, Benny Kimelfeld, and Mirek Riedewald. Tractable orders for direct access to ranked answers of conjunctive queries. ACM Transactions on Database Systems, jan 2023. URL: https://doi.org/10.1145/3578517.
  13. Nofar Carmeli, Shai Zeevi, Christoph Berkholz, Benny Kimelfeld, and Nicole Schweikardt. Answering (unions of) conjunctive queries using random access and random-order enumeration. In Proceedings of the 39th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, pages 393-409, 2020. URL: https://doi.org/10.1145/3375395.3387662.
  14. Ashok K. Chandra and Philip M. Merlin. Optimal implementation of conjunctive queries in relational data bases. In Proceedings of the Ninth Annual ACM Symposium on Theory of Computing, STOC '77, pages 77-90, New York, NY, USA, 1977. ACM. URL: https://doi.org/10.1145/800105.803397.
  15. Idan Eldar, Nofar Carmeli, and Benny Kimelfeld. Direct access for answers to conjunctive queries with aggregation. arXiv preprint, 2023. URL: https://doi.org/10.48550/arXiv.2303.05327.
  16. Johannes K Fichte, Markus Hecher, Neha Lodha, and Stefan Szeider. An smt approach to fractional hypertree width. In Principles and Practice of Constraint Programming: 24th International Conference, CP 2018, Lille, France, August 27-31, 2018, Proceedings 24, pages 109-127. Springer, 2018. URL: https://doi.org/10.1007/978-3-319-98334-9_8.
  17. Robert Ganian, André Schidler, Manuel Sorge, and Stefan Szeider. Threshold treewidth and hypertree width. Journal of Artificial Intelligence Research, 74:1687-1713, 2022. URL: https://doi.org/10.1613/jair.1.13661.
  18. Georg Gottlob and Reinhard Pichler. Hypergraphs in model checking: Acyclicity and hypertree-width versus clique-width. SIAM Journal on Computing, 33(2):351-378, 2004. URL: https://doi.org/10.1137/S0097539701396807.
  19. Martin Grohe and Dániel Marx. Constraint solving via fractional edge covers. ACM Transactions on Algorithms (TALG), 11(1):4, 2014. URL: https://doi.org/10.1145/2636918.
  20. Jinbo Huang and Adnan Darwiche. DPLL with a Trace: From SAT to Knowledge Compilation. In Proceedings of the Nineteenth International Joint Conference on Artificial Intelligence, pages 156-162, 2005. URL: http://ijcai.org/Proceedings/05/Papers/0876.pdf.
  21. Manas R Joglekar, Rohan Puttagunta, and Christopher Ré. Ajar: Aggregations and joins over annotated relations. In Proceedings of the 35th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, pages 91-106, 2016. URL: https://doi.org/10.1145/2902251.2902293.
  22. Jens Keppeler. Answering Conjunctive Queries and FO+MOD Queries under Updates. PhD thesis, Humboldt-Universität zu Berlin, Mathematisch-Naturwissenschaftliche Fakultät, 2020. URL: http://edoc.hu-berlin.de/18452/22264.
  23. Mahmoud Abo Khamis, Hung Q Ngo, and Atri Rudra. Faq: questions asked frequently. arXiv preprint, 2015. URL: https://doi.org/10.48550/arXiv.1504.04044.
  24. Mahmoud Abo Khamis, Hung Q Ngo, and Atri Rudra. Faq: questions asked frequently. In Proceedings of the 35th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, pages 13-28, 2016. URL: https://doi.org/10.1145/2902251.2902280.
  25. Matthias Lanzinger. Tractability beyond β-acyclicity for conjunctive queries with negation and sat. Theoretical Computer Science, 942:276-296, 2023. URL: https://doi.org/10.1016/j.tcs.2022.12.002.
  26. Dan Olteanu. Factorized databases: A knowledge compilation perspective. In AAAI Workshop: Beyond NP, 2016. URL: http://www.aaai.org/ocs/index.php/WS/AAAIW16/paper/view/12638.
  27. Dan Olteanu and Jakub Závodnỳ. Factorised representations of query results: size bounds and readability. In Proceedings of the 15th International Conference on Database Theory, pages 285-298. ACM, 2012. URL: https://doi.org/10.1145/2274576.2274607.
  28. Dan Olteanu and Jakub Závodnỳ. Size bounds for factorised representations of query results. ACM Transactions on Database Systems (TODS), 40(1):1-44, 2015. URL: https://doi.org/10.1145/2656335.
  29. S. Ordyniak, D. Paulusma, and S. Szeider. Satisfiability of acyclic and almost acyclic CNF formulas. Theoretical Computer Science, 481:85-99, 2013. URL: https://doi.org/10.1016/j.tcs.2012.12.039.
  30. Reinhard Pichler and Sebastian Skritek. Tractable counting of the answers to conjunctive queries. Journal of Computer and System Sciences, 79:984-1001, sep 2013. URL: https://doi.org/10.1016/j.jcss.2013.01.012.
  31. Tian Sang, Fahiem Bacchus, Paul Beame, Henry A Kautz, and Toniann Pitassi. Combining component caching and clause learning for effective model counting. Theory and Applications of Satisfiability Testing, 2004. URL: http://www.satisfiability.org/SAT04/programme/21.pdf.
  32. Maximilian Schleich, Dan Olteanu, and Radu Ciucanu. Learning linear regression models over factorized joins. In Proceedings of the 2016 International Conference on Management of Data, pages 3-18. ACM, 2016. URL: https://doi.org/10.1145/2882903.2882939.
  33. Mihalis Yannakakis. Algorithms for acyclic database schemes. In Proceedings of the Seventh International Conference on Very Large Data Bases - Volume 7, VLDB '81, pages 82-94. VLDB Endowment, 1981. Google Scholar
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail