Tractable Conjunctive Queries over Static and Dynamic Relations

Authors Ahmet Kara , Zheng Luo , Milos Nikolic , Dan Olteanu , Haozhe Zhang



PDF
Thumbnail PDF

File

LIPIcs.ICDT.2025.12.pdf
  • Filesize: 0.95 MB
  • 21 pages

Document Identifiers

Author Details

Ahmet Kara
  • OTH Regensburg, Germany
Zheng Luo
  • University of California, Los Angeles, CA, USA
Milos Nikolic
  • University of Edinburgh, UK
Dan Olteanu
  • University of Zurich, Switzerland
Haozhe Zhang
  • University of Zurich, Switzerland

Acknowledgements

Olteanu would like to thank the IVM team at RelationalAI and in particular Niko Göbel for discussions that motivated this work. Luo’s contribution was done while he was with the University of Zurich.

Cite As Get BibTex

Ahmet Kara, Zheng Luo, Milos Nikolic, Dan Olteanu, and Haozhe Zhang. Tractable Conjunctive Queries over Static and Dynamic Relations. In 28th International Conference on Database Theory (ICDT 2025). Leibniz International Proceedings in Informatics (LIPIcs), Volume 328, pp. 12:1-12:21, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2025) https://doi.org/10.4230/LIPIcs.ICDT.2025.12

Abstract

We investigate the evaluation of conjunctive queries over static and dynamic relations. While static relations are given as input and do not change, dynamic relations are subject to inserts and deletes.
We characterise syntactically three classes of queries that admit constant update time and constant enumeration delay. We call such queries tractable. Depending on the class, the preprocessing time is linear, polynomial, or exponential (under data complexity, so the query size is constant).
To decide whether a query is tractable, it does not suffice to analyse separately the sub-queries over the static relations and over the dynamic relations, respectively. Instead, we need to take the interaction between the static and the dynamic relations into account. Even when the sub-query over the dynamic relations is not tractable, the overall query can become tractable if the dynamic relations are sufficiently constrained by the static ones.

Subject Classification

ACM Subject Classification
  • Theory of computation → Database query processing and optimization (theory)
  • Information systems → Database views
  • Information systems → Data streams
Keywords
  • fully dynamic algorithm
  • constant enumeration delay
  • constant update time

Metrics

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

References

  1. Serge Abiteboul, Richard Hull, and Victor Vianu. Foundations of Databases. Addison-Wesley, 1995. Google Scholar
  2. Albert Atserias, Martin Grohe, and Dániel Marx. Size Bounds and Query Plans for Relational Joins. SIAM J. Comput., 42(4):1737-1767, 2013. URL: https://doi.org/10.1137/110859440.
  3. Guillaume Bagan, Arnaud Durand, and Etienne Grandjean. On Acyclic Conjunctive Queries and Constant Delay Enumeration. In CSL, pages 208-222, 2007. URL: https://doi.org/10.1007/978-3-540-74915-8_18.
  4. Christoph Berkholz, Jens Keppeler, and Nicole Schweikardt. Answering Conjunctive Queries Under Updates. In PODS, pages 303-318, 2017. URL: https://doi.org/10.1145/3034786.3034789.
  5. Christoph Berkholz, Jens Keppeler, and Nicole Schweikardt. Answering FO+MOD Queries under Updates on Bounded Degree Databases. ACM Trans. Database Syst., 43(2):7:1-7:32, 2018. URL: https://doi.org/10.1145/3232056.
  6. Christoph Berkholz, Jens Keppeler, and Nicole Schweikardt. Answering UCQs under Updates and in the Presence of Integrity Constraints. In ICDT, pages 8:1-8:19, 2018. URL: https://doi.org/10.4230/LIPICS.ICDT.2018.8.
  7. Johann Brault-Baron. De la pertinence de l'énumération: complexité en logiques propositionnelle et du premier ordre. PhD thesis, Université de Caen, 2013. Google Scholar
  8. Johann Brault-Baron. Hypergraph Acyclicity Revisited. ACM Comput. Surv., 49(3):54:1-54:26, 2016. URL: https://doi.org/10.1145/2983573.
  9. Mihai Budiu, Tej Chajed, Frank McSherry, Leonid Ryzhyk, and Val Tannen. DBSP: Automatic Incremental View Maintenance for Rich Query Languages. Proc. VLDB Endow., 16(7):1601-1614, 2023. URL: https://doi.org/10.14778/3587136.3587137.
  10. Samir Datta, Raghav Kulkarni, Anish Mukherjee, Thomas Schwentick, and Thomas Zeume. Reachability is in DynFO. J. ACM, 65(5):33:1-33:24, 2018. URL: https://doi.org/10.1145/3212685.
  11. Arnaud Durand and Etienne Grandjean. First-order Queries on Structures of Bounded Degree are Computable with Constant Delay. ACM Trans. Comput. Logic, 8(4):21, 2007. URL: https://doi.org/10.1145/1276920.1276923.
  12. Monika Henzinger, Sebastian Krinninger, Danupon Nanongkai, and Thatchaphol Saranurak. Unifying and Strengthening Hardness for Dynamic Problems via the Online Matrix-Vector Multiplication Conjecture. In STOC, pages 21-30, 2015. URL: https://doi.org/10.1145/2746539.2746609.
  13. Muhammad Idris, Martín Ugarte, and Stijn Vansummeren. The Dynamic Yannakakis Algorithm: Compact and Efficient Query Processing Under Updates. In SIGMOD, pages 1259-1274, 2017. URL: https://doi.org/10.1145/3035918.3064027.
  14. Ahmet Kara, Zheng Luo, Milos Nikolic, Dan Olteanu, and Haozhe Zhang. Tractable Conjunctive Queries over Static and Dynamic Relations. CoRR, arXiv:2404.16224, 2024. URL: https://doi.org/10.48550/arXiv.2404.16224.
  15. Ahmet Kara, Hung Q. Ngo, Milos Nikolic, Dan Olteanu, and Haozhe Zhang. Counting Triangles under Updates in Worst-Case Optimal Time. In ICDT, pages 4:1-4:18, 2019. URL: https://doi.org/10.4230/LIPICS.ICDT.2019.4.
  16. Ahmet Kara, Hung Q. Ngo, Milos Nikolic, Dan Olteanu, and Haozhe Zhang. Maintaining Triangle Queries under Updates. ACM Trans. Database Syst., 45(3):11:1-11:46, 2020. URL: https://doi.org/10.1145/3396375.
  17. Ahmet Kara, Milos Nikolic, Dan Olteanu, and Haozhe Zhang. Trade-offs in Static and Dynamic Evaluation of Hierarchical Queries. In PODS, pages 375-392, 2020. URL: https://doi.org/10.1145/3375395.3387646.
  18. Ahmet Kara, Milos Nikolic, Dan Olteanu, and Haozhe Zhang. Conjunctive Queries with Free Access Patterns Under Updates. In ICDT, volume 255 of LIPIcs, pages 17:1-17:20, 2023. URL: https://doi.org/10.4230/LIPICS.ICDT.2023.17.
  19. Ahmet Kara, Milos Nikolic, Dan Olteanu, and Haozhe Zhang. F-IVM: Analytics over Relational Databases under Updates. The VLDB Journal, 2023. URL: https://doi.org/10.1007/S00778-023-00817-W.
  20. Ahmet Kara, Milos Nikolic, Dan Olteanu, and Haozhe Zhang. Trade-offs in Static and Dynamic Evaluation of Hierarchical Queries. Log. Methods Comput. Sci., 19(3), 2023. URL: https://doi.org/10.46298/LMCS-19(3:11)2023.
  21. Mahmoud Abo Khamis, Ahmet Kara, Dan Olteanu, and Dan Suciu. Insert-Only versus Insert-Delete in Dynamic Query Evaluation. Proc. ACM Manag. Data, 2(5):219:1-219:26, 2024. URL: https://doi.org/10.1145/3695837.
  22. Christoph Koch, Yanif Ahmad, Oliver Kennedy, Milos Nikolic, Andres Nötzli, Daniel Lupei, and Amir Shaikhha. DBToaster: Higher-order Delta Processing for Dynamic, Frequently Fresh Views. The VLDB Journal, 23(2):253-278, 2014. URL: https://doi.org/10.1007/S00778-013-0348-4.
  23. Dániel Marx. Approximating Fractional Hypertree Width. ACM Trans. Algorithms, 6(2):29:1-29:17, 2010. URL: https://doi.org/10.1145/1721837.1721845.
  24. Hung Q. Ngo, Ely Porat, Christopher Ré, and Atri Rudra. Worst-case Optimal Join Algorithms. J. ACM, 65(3):16:1-16:40, 2018. URL: https://doi.org/10.1145/3180143.
  25. Dan Olteanu and Maximilian Schleich. Factorized Databases. SIGMOD Rec., 45(2):5-16, 2016. URL: https://doi.org/10.1145/3003665.3003667.
  26. Dan Olteanu and Jakub Závodný. Size Bounds for Factorised Representations of Query Results. ACM TODS, 40(1):2:1-2:44, 2015. URL: https://doi.org/10.1145/2656335.
  27. Dan Suciu, Dan Olteanu, Christopher Ré, and Christoph Koch. Probabilistic Databases. Synthesis Lectures on Data Management. Morgan & Claypool Publishers, 2011. URL: https://doi.org/10.2200/S00362ED1V01Y201105DTM016.
  28. Yufei Tao and Ke Yi. Intersection Joins under Updates. J. Comput. Syst. Sci., 124:41-64, 2022. URL: https://doi.org/10.1016/J.JCSS.2021.09.004.
  29. Qichen Wang, Xiao Hu, Binyang Dai, and Ke Yi. Change Propagation Without Joins. Proc. VLDB Endow., 16(5):1046-1058, 2023. URL: https://doi.org/10.14778/3579075.3579080.
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