Skip to main content

Incremental recomputation of recursive queries with nested sets and aggregate functions

  • Views
  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1369))

Abstract

We examine the power of incremental evaluation systems that use an SQL-like language for maintaining recursively-defined views. We show that recursive queries such as transitive closure, and “alternating paths” can be incrementally maintained in a nested relational language, when some auxiliary relations are allowed. In the presence of aggregate functions, even more queries can be maintained, for example, the “same generation” query. In contrast, it is still an open problem whether such queries are maintainable in relational calculus. We then restrict the language so that no nested relations are involved (but we keep the aggregate functions). Such a language captures the capability of most practical relational database systems. We prove that this restriction does not reduce the incremental computational power; that is, any query that can be maintained in a nested language with aggregates, is still maintainable using only fiat relations. We also show that one does not need auxiliary relations of arity more than 2. In particular, this implies that the recursive queries maintainable in the nested language with aggregates, can be also maintained in a practical relational database systems using auxiliary tables of arity at most 2. This is again in sharp contrast to maintenance in relational calculus, which admits a strict arity-based hierarchy.

Part of this work was done when Wong was visiting Bell Labs and when Libkin was visiting Institute of Systems Science.

This is a preview of subscription content, log in via an institution.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. S. Abiteboul, R. Hull and V. Vianu. Foundations of Databases. Addison Wesley, 1995.

    Google Scholar 

  2. S. Abiteboul and P. Kanellakis. Query languages for complex object databases. SIGACT News, 21(3):9–18, 1990.

    Google Scholar 

  3. A. Aho and J. Ullman. Universality of data retrieval languages. In Proceedings 6th Symposium on Principles of Programming Languages, Texas, January 1979, pages 110–120, 1979.

    Google Scholar 

  4. P. Buneman, L. Libkin, D. Suciu, V. Tannen, and L. Wong. Comprehension syntax. SIGMOD Record, 23(1):87–96, March 1994.

    Google Scholar 

  5. P. Buneman, S. Naqvi, V. Tannen, and L. Wong. Principles of programming with complex objects and collection types. Theoretical Computer Science, 149(1):3–48, September 1995.

    Google Scholar 

  6. J.-Y. Cai. Lower bound for constant-depth circuits in the presence of help bits. Information Processing Letters, 36:79–83, 1990.

    Google Scholar 

  7. G. Dong, L. Libkin, and L. Wong. On impossibility of decremental recomputation of recursive queries in relational calculus and SQL. In Proceedings of 5th International Workshop on Database Programming Languages, Gubbio, Italy, September 1995, Springer Electronic Workshops in Computing, 1996. Available at http: //www.springer.co.uk /eWiC /Workshops /DBPL5.htm1.

    Google Scholar 

  8. G. Dong, L. Libkin, and L. Wong. Local properties of query languages. In Proceedings of 6th International Conference on Database Theory, pages 140–154, Delphi, Greece, January 1997.

    Google Scholar 

  9. G. Dong and J. Su. Incremental and decrementa evaluation of transitive closure by first-order queries. Information and Computation, 120(1):101–106, July 1995.

    Google Scholar 

  10. G. Dong and J. Su. Space-bounded FOIES. In Proceedings of 14th ACM Symposium on Principles of Database Systems, San Jose, California, pages 139–150, May 1995.

    Google Scholar 

  11. G. Dong and J. Su. Deterministic FOIES are strictly weaker. Annals of Mathematics and Artificial Intelligence 19(1):127–146, 1997.

    Google Scholar 

  12. G. Dong, J. Su, and R. Topor. Nonrecursive incremental evaluation of Datalog queries. Annals of Mathematics and Artificial Intelligence, 14:187–223, 1995.

    Google Scholar 

  13. G. Dong and L. Wong. Some relationships between FOIES and El arity hierarchies. Bulletin of EATCS, 61:72–79, 1997.

    Google Scholar 

  14. N. Immerman. Languages that capture complexity classes. SIAM Journal of Computing, 16:760–778, 1987.

    Google Scholar 

  15. L. Libkin and L. Wong. Aggregate functions, conservative extension, and linear orders. In C. Beeri, A. Ohori, and D. Shasha, editors, Proceedings of 4th International Workshop on Database Programming Languages, New York, August 1993, pages 282–294. Springer-Verlag, January 1994.

    Google Scholar 

  16. L. Libkin and L. Wong. Conservativity of nested relational calculi with internal generic functions. Information Processing Letters, 49(6):273–280, March 1994.

    Google Scholar 

  17. L. Libkin and L. Wong. Query languages for bags and aggregate functions. Journal of Computer and System Sciences, 55 (1997), 241–272.

    Google Scholar 

  18. L. Libkin and L. Wong. Incremental recomputation of recursive queries with nested sets and aggregate functions. Technical Report 97-224-0, Institute of Systems Science, Heng Mui Keng Terrace, Singapore 119597, April 1997.

    Google Scholar 

  19. J. Paredaens and D. Van Gucht. Converting nested relational algebra expressions into flat algebra expressions. ACM Transaction on Database Systems, 17(1):65–93, March 1992.

    Google Scholar 

  20. S. Patnaik and N. Irnmerman. Dyn-FO: A parallel dynamic complexity class. In Proceedings of 13th ACM Symposium on Principles of Database Systems, pages 210–221, Minneapolis, Minnesota, May 1994.

    Google Scholar 

  21. P. Wadler. Comprehending monads. Mathematical Structures in Computer Science, 2:461–493, 1992.

    Google Scholar 

  22. L. Wong. Querying Nested Collections. PhD thesis, Department of Computer and Information Science, University of Pennsylvania, Philadelphia, PA 19104, August 1994. Available as University of Pennsylvania IRCS Report 94-09.

    Google Scholar 

  23. L. Wong. Normal forms and conservative extension properties for query languages over collection types. Journal of Computer and System Sciences, 52(3):495–505, June 1996.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Sophie Cluet Rick Hull

Rights and permissions

Reprints and permissions

Copyright information

© 1998 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Libkin, L., Wong, L. (1998). Incremental recomputation of recursive queries with nested sets and aggregate functions. In: Cluet, S., Hull, R. (eds) Database Programming Languages. DBPL 1997. Lecture Notes in Computer Science, vol 1369. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-64823-2_13

Download citation

  • DOI: https://doi.org/10.1007/3-540-64823-2_13

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-64823-9

  • Online ISBN: 978-3-540-68534-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics