Tractable iteration mechanisms for bag languages

Preliminary report
  • Latha S. Colby
  • Leonid Libkin
Contributed Papers Session 10: Spatial Data and Bulk Data
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1186)

Abstract

The goal of this paper is to study tractable iteration mechanisms for bags. The presence of duplicates in bags prevents iteration mechanisms developed in the context of sets to be directly applied to bags without losing tractability. We study two constructs for controlling tractability of iteration over bags. The deflationary fixpoint construct keeps removing elements from a bag until a fixpoint is reached. The bounded fixpoint construct is an inflationary iteration mechanism that never exceeds some predefined bounding bag. We study these constructs in the context of a standard (nested) bag algebra. We show that the deflationary and bounded inflationary fixpoint constructs are equally expressive and strictly more expressive than their set-based counterparts. We also show that, unlike in the set case, the bag algebra with bounded fixpoint fails to capture all PTIME queries over databases with ordered domains. We then show that adding just one construct, which can be used to assign unique tags to duplicates, captures the class of all polynomial time queries over bags when a total ordering on the domain of atomic elements is available. Finally, we compare the expressive powers of the bag algebra and the nested relational algebra with aggregate functions in the presence of these fixpoint operators.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    S. Abiteboul, R. Hull and V. Vianu. Foundations of Databases. Addison Wesley, 1995.Google Scholar
  2. 2.
    P. Buneman, S. Naqvi, V. Tannen, L. Wong. Principles of programming with complex objects and collection types. Theoretical Computer Science, 149(1):3–48, September 1995.Google Scholar
  3. 3.
    S. Chaudhuri and M. Vardi. Optimization of real conjunctive queries. In Proceedings of the 12th Symposium on Principles of Database Systems, Washington DC, 1994.Google Scholar
  4. 4.
    P. Clote. Computation models and function algebras. Proc. Logic and Computational Complexity, Springer LNCS 960, 1994, pages 98–130.Google Scholar
  5. 5.
    L. S. Colby, E. L. Robertson, L. V. Saxton, and D. Van Gucht. A query language for list-based complex objects. In Proceedings of the 13th Symposium on Principles of Database Systems, pages 179–189, Minneapolis, MN, 1994.Google Scholar
  6. 6.
    T. Griffin and L. Libkin. Incremental maintenance of views with duplicates. In Proceedings ACM SIGMOD, 1995, pages 328–339.Google Scholar
  7. 7.
    S. Grumbach, L. Libkin, T. Milo and L. Wong. Query languages for bags: expressive power and complexity. SIGACT News 27(2): 30–37, 1996.Google Scholar
  8. 8.
    S. Grumbach and T. Milo. Towards tractable algebras for bags. In Proceedings of the 12th-SIGART Symposium on Principles of Database Systems, pages 49–58, Washington, DC, May 1993.Google Scholar
  9. 9.
    S. Grumbach and T. Milo. An algebra for pomsets. In Proceedings of the International Conference on Database Theory, Prague, 1995, pages 191–207, 1994.Google Scholar
  10. 10.
    S. Grumbach and V. Vianu. Tractable query languages for complex object databases. J. Comput. and Syst. Sci. 51(2): 149–167, 1995.MathSciNetGoogle Scholar
  11. 11.
    Y. Gurevich and S. Shelah. Fixed-point extensions of first-order logic. Annals of Pure and Applied Logic 32 (1986), 265–280.CrossRefGoogle Scholar
  12. 12.
    M. Gyssens and D. Van Gucht. A comparison between algebraic query languages for flat and nested databases. Theoretical Computer Science 87 (1991), 263–286.Google Scholar
  13. 13.
    M. Gyssens, D. Van Gucht and D. Suciu. On polynomially bounded fixpoint construct for nested relations. In Proceedings of 5th Workshop on Database Programming Languages, Gubbio, Italy, 1995. Available as Springer Electronic WiC publication.Google Scholar
  14. 14.
    N. Immerman. Relational queries computable in polynomial time. Information and Control, 68:86–104, 1986.CrossRefGoogle Scholar
  15. 15.
    J. Krajíček. Bounded Arithmetic, Propositional Logic, and Complexity Theory. Cambridge University Press, 1995.Google Scholar
  16. 16.
    L. Libkin and L. Wong. Some properties of query languages for bags. In Proceedings of the 4th Workshop on Database Programming Languages, Springer Verlag, 1994.Google Scholar
  17. 17.
    L. Libkin and L. Wong. Query languages for bags and aggregate functions. J. Comput. and Syst. Sci., to appear. Extended abstract in PODS'94.Google Scholar
  18. 18.
    H. Rose. Subrecursion: Functions and Hierarchies. Oxford, 1984.Google Scholar
  19. 19.
    D. Suciu. Fixpoints and bounded fixpoints for complex objects. In Proceedings of the 4th Workshop on Database Programming Languages, Springer Verlag, 1994.Google Scholar
  20. 20.
    D. Suciu and V. Tannen. A query language for NC. In Proceedings of the 13th Symposium on Principles of Database Systems, Minneapolis, MN, 1994.Google Scholar
  21. 21.
    M. Vardi. The complexity of relational query languages. In Proceedings of the 14th ACM Symposium on Theory of Computing, pages 137–146, 1982.Google Scholar

Copyright information

© Springer-Verlag 1997

Authors and Affiliations

  • Latha S. Colby
    • 1
  • Leonid Libkin
    • 1
  1. 1.Bell LaboratoriesLucent TechnologiesMurray HillUSA

Personalised recommendations