Calculi for Bags and their Complexity

  • Stéphane Grumbach
  • Tova Milo
  • Yoram Kornatzky
Conference paper
Part of the Workshops in Computing book series (WORKSHOPS COMP.)


In this paper, we propose calculi to express queries over bags (i.e. multisets), and study their complexity. We show that the calculus for bags is undecidable in general. Nevertheless, simple syntactic restrictions on the calculus result in computable languages. We provide here two restricted calculi with bounded complexity, and show that the restrictions are minimal. Indeed, any looser restriction leads to non computable queries.


Query Language Expressive Power Relational Algebra Algebraic Operation Relation Symbol 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [AB87]
    S. Abiteboul and C. Beeri. On the power of languages for the manipulation of complex objects. In Proc. Int. Workshop on Theory and Applications of Nested Relations and Complex Objects (extended abstract), Dàrmstadt, 1987. INRIA research report n 846.Google Scholar
  2. [Alb81]
    J. Albert. Algebraic properties of bag data types. In Proc. 17th Int’l Conf. on Very Large Data Bases, pages 211–219, 1991.Google Scholar
  3. [BTS91]
    V. Breazu-Tannen and R. Subrahmanyam. Logical and computational aspects of programming with sets/bags/lists. In Proc. 18th In.i. Col. on Automata, Languages and Programming, 1991.Google Scholar
  4. [CDV88]
    M. Carrey, D. DeWitt, and S. Vandenberg. A data model an query language for exodus. In Proc. ACM SIGMOD 1988 Int’l Conf. on Managment of Data, Chicago, IL, 1988.Google Scholar
  5. [CV93]
    S. Chaudhuri and M. Vardi. Optimization of real conjunctive queries. In Proc. 12th ACM Symp. on Principles of Database Systems, Washington, May 1993.Google Scholar
  6. [DGK82]
    U. Dayal, N. Goodman, and R.H. Katz. An extended relational algebra with control over duplicate elimination. In Proc. ACM Symp. on Principles of Database Systems, Los Angeles, CA„ 1982.Google Scholar
  7. [Fea87]
    D.H. Fishman and et al. Iris: An object oriented database manag-ment system. In ACM Trans. Office Information Systems, 5:1, 1987.Google Scholar
  8. [FR74]
    M.J. Fischer and M.O. Rabin. Super-exponential complexity of Presburger arithmetic. In Proc. AMS Symp. on Complexity of real computation process, volume V II, 1974.Google Scholar
  9. [FR79]
    J. Ferrante and C.W. Rackoff. The computational complexity of logical theories, volume 718 of Lecture Notes in Mathematics. Springer, 1979.Google Scholar
  10. [GM93]
    S. Grumbach and T. Milo. Towards tractable algebras for bag. In Proc. 12th ACM Symp. on Principles of Database Systems, Washington, May 1993.Google Scholar
  11. [Gur85]
    Y. Gurevich. Model Theoretic Logics, chapter Monadic Second-Order Theories, pages 479–506. Springer-Verlag, 1985.Google Scholar
  12. [GV91a]
    S. Grumbach and V. Vianu. Expressiveness and complexity of restricted languages for complex objects. In Proc. 3rd Int. Workshop on database programming languages, Nafplion, Aug. 1991.Google Scholar
  13. [GV91b]
    S. Grumbach and V. Vianu. Tractable query languages for complex object databases. In Proc. 10th ACM Symp. on Principles of Database Systems, pages 315–327, Boulder, May 1991.Google Scholar
  14. [HM81]
    M. Hammer and D. Mcleaod. Database Description with SDM: a Semantic Database Model. ACM trans. on Database Systems 6, 3, 1981.CrossRefGoogle Scholar
  15. [HS88]
    R. Hull and J. Su. On the expressive power of database queries with intermediate types. In Proc. 7th ACM Symp. on Principles of Database Systems, 1988.Google Scholar
  16. [HS89]
    R. Hull and J. Su. Untyped Sets, Invention and Computable Queries. In Proc. 8th ACM Symp. on Principles of Database Systems, 1989.Google Scholar
  17. [KG85]
    A. Klausner and N. Goodman. Multirelations semantics and languages. In Proc. 11th Intl. Conf. on Very Large Databases, Stockholm, Sweden, 1985.Google Scholar
  18. [LW93]
    L. Libkin and L. Wong.. Some Properties of Languages for Bags. In Proc. 4th Intl. Workshop on Database Programming Languages, NYC, 1993.Google Scholar
  19. [MD86]
    F. Manola and U. Dayal. Pdm: An objected-oriented data model. In Proc. Intl. Workshop on Object Oriented Database Systems, Asilomor, CA, 1986.Google Scholar
  20. [Mum90]
    I.S. Mumick. et al. The magic of duplicates and aggregates. In Proc. 16th Intl. Conf. on Very Large Databases, Brisbane, Australia, 1990.Google Scholar
  21. [Pre29]
    M. Presburger. über die Vollständigkeit eines gewissen systems der arithmetik ganzer zahlen, in welchem die addition als einzige operation hervortritt. In Comptes rendus du premier Congrès des Mathématiciens des Pays Slaves, pages 92–101, Warszawa, 1929.Google Scholar
  22. [RAB77]
    M. Rabin. Handbook of Mathematical Logic, chapter Decidable Theories, pages 595–629. North-Holland, 1977.Google Scholar
  23. [Sko30]
    T. Skolem. über einige satzfunktionen in der arithmetik. Skrifter Norske Vid. Akad. Oslo I. Klasse, 7, 1930.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1994

Authors and Affiliations

  • Stéphane Grumbach
    • 1
  • Tova Milo
    • 2
  • Yoram Kornatzky
    • 3
  1. 1.I.N.R.I.A.Le ChesnayFrance
  2. 2.Dept. of Computer ScienceU. of TorontoCanada
  3. 3.Dept. of Math. and CSBen-Gurion U.Beer-ShebaIsrael

Personalised recommendations