skip to main content
research-article

Answering FO+MOD Queries under Updates on Bounded Degree Databases

Published:22 August 2018Publication History
Skip Abstract Section

Abstract

We investigate the query evaluation problem for fixed queries over fully dynamic databases, where tuples can be inserted or deleted. The task is to design a dynamic algorithm that immediately reports the new result of a fixed query after every database update.

We consider queries in first-order logic (FO) and its extension with modulo-counting quantifiers (FO+MOD) and show that they can be efficiently evaluated under updates, provided that the dynamic database does not exceed a certain degree bound.

In particular, we construct a data structure that allows us to answer a Boolean FO+MOD query and to compute the size of the result of a non-Boolean query within constant time after every database update. Furthermore, after every database update, we can update the data structure in constant time such that afterwards we are able to test within constant time for a given tuple whether or not it belongs to the query result, to enumerate all tuples in the new query result, and to enumerate the difference between the old and the new query result with constant delay between the output tuples. The preprocessing time needed to build the data structure is linear in the size of the database.

Our results extend earlier work on the evaluation of first-order queries on static databases of bounded degree and rely on an effective Hanf normal form for FO+MOD recently obtained by Heimberg, Kuske, and Schweikardt (LICS 2016).

References

  1. Serge Abiteboul, Richard Hull, and Victor Vianu. 1995. Foundations of Databases. Addison-Wesley. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Christoph Berkholz, Jens Keppeler, and Nicole Schweikardt. 2017. Answering conjunctive queries under updates. In Proceedings of the 36th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, (PODS’17), Emanuel Sallinger, Jan Van den Bussche, and Floris Geerts (Eds.). ACM, 303--318. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Christoph Berkholz, Jens Keppeler, and Nicole Schweikardt. 2017. Answering FO+MOD queries under updates on bounded degree databases. In Proceedings of the 20th International Conference on Database Theory, ICDT 2017, March 21-24, 2017, Venice, Italy (LIPIcs), Michael Benedikt and Giorgio Orsi (Eds.), Vol. 68. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 8:1--8:18.Google ScholarGoogle Scholar
  4. Christoph Berkholz, Jens Keppeler, and Nicole Schweikardt. 2018. Answering UCQs under Updates and in the presence of integrity constraints. In Proceedings of the 21st International Conference on Database Theory (ICDT’18). 8:1--8:19.Google ScholarGoogle Scholar
  5. Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. 2009. Introduction to Algorithms (3rd ed.). MIT Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Arnaud Durand and Etienne Grandjean. 2007. First-order queries on structures of bounded degree are computable with constant delay. ACM Trans. Comput. Log. 8, 4 (2007). Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Arnaud Durand, Nicole Schweikardt, and Luc Segoufin. 2014. Enumerating answers to first-order queries over databases of low degree. In Proceedings of the 33rd ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems (PODS’14). 121--131. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Markus Frick and Martin Grohe. 2004. The complexity of first-order and monadic second-order logic revisited. Ann. Pure Appl. Logic 130, 1--3 (2004), 3--31.Google ScholarGoogle ScholarCross RefCross Ref
  9. Martin Grohe. 2017. Descriptive Complexity, Canonisation, and Definable Graph Structure Theory. Lecture Notes in Logic, Vol. 47. Association for Symbolic Logic in conjunction with Cambridge University Press.Google ScholarGoogle Scholar
  10. Martin Grohe, Stephan Kreutzer, and Sebastian Siebertz. 2017. Deciding first-order properties of nowhere dense graphs. J. ACM 64, 3 (2017), 17:1--17:32. Conference version: in Proceedings of the 46th ACM Symposium on Theory of Computing (STOC’14), pp. 89--98, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Martin Grohe and Nicole Schweikardt. 2018. First-order query evaluation with cardinality conditions. In Proceedings of the 37th ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems (PODS’18). Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Lucas Heimberg, Dietrich Kuske, and Nicole Schweikardt. 2016. Hanf normal form for first-order logic with unary counting quantifiers. In Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science (LICS’16). 277--286. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Wojciech Kazana and Luc Segoufin. 2011. First-order query evaluation on structures of bounded degree. Logic. Methods Comput. Sci. 7, 2 (2011).Google ScholarGoogle Scholar
  14. Wojciech Kazana and Luc Segoufin. 2013. Enumeration of first-order queries on classes of structures with bounded expansion. In Proceedings of the 32nd ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems (PODS’13). 297--308. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Dietrich Kuske and Nicole Schweikardt. 2017. First-order logic with counting: At least, weak Hanf normal forms always exist and can be computed! In Proceedings of the 32nd Annual ACM/IEEE Symposium on Logic in Computer Science (LICS’17). Full version available at CoRR abs/1703.01122.Google ScholarGoogle Scholar
  16. Leonid Libkin. 2004. Elements of Finite Model Theory. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Eugene M. Luks. 1982. Isomorphism of graphs of bounded valence can be tested in polynomial time. J. Comput. Syst. Sci. 25, 1 (1982), 42--65.Google ScholarGoogle ScholarCross RefCross Ref
  18. Bernard M. E. Moret and Henry D. Shapiro. 1991. Algorithms from P to NP: Volume 1: Design 8 Efficiency. Benjamin-Cummings. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Sushant Patnaik and Neil Immerman. 1997. Dyn-FO: A parallel, dynamic complexity class. J. Comput. Syst. Sci. 55, 2 (1997), 199--209. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Nicole Schweikardt, Luc Segoufin, and Alexandre Vigny. 2018. Enumeration for FO queries over nowhere dense graphs. In Proceedings of the 37th ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems (PODS’18). Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Thomas Schwentick and Thomas Zeume. 2016. Dynamic complexity: Recent updates. SIGLOG News 3, 2 (2016), 30--52. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Detlef Seese. 1996. Linear time computable problems and first-order descriptions. Math. Struct. Comput. Sci. 6, 6 (1996), 505--526.Google ScholarGoogle ScholarCross RefCross Ref
  23. Luc Segoufin and Alexandre Vigny. 2017. Constant delay enumeration for FO queries over databases with local bounded expansion. In Proceedings of the 20th International Conference on Database Theory (ICDT’17). 20:1--20:16.Google ScholarGoogle Scholar

Index Terms

  1. Answering FO+MOD Queries under Updates on Bounded Degree Databases

        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 the author(s) 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: 22 August 2018
          • Accepted: 1 June 2018
          • Revised: 1 April 2018
          • Received: 1 July 2017
          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