On two forms of structural recursion

  • Dan Suciu
  • Limsoon Wong
Contributed Papers Query Languages I
Part of the Lecture Notes in Computer Science book series (LNCS, volume 893)


We investigate and compare two forms of recursion on sets for querying nested collections. The first one is called sri and it corresponds to sequential processing of data. The second one is called sru and it corresponds to data-parallel processing. A uniform first-order translation from sru into sri was known from previous work. The converse translation is by necessity more difficult and we have obtained three main results concerning it. First, we exhibit a uniform translation of sri queries into sru queries over the nested relational algebra. We observe that this translation maps PTIME algorithms into exponential-space queries. The second result proves that any uniform translation of sri queries into sru queries over the nested relational algebra must map some PTIME queries into exponential-space ones. In fact, in the presence of certain external functions, we provide a PTIME sri query for which any equivalent sru query requires exponential space. Thus, as a mechanism for implementing algorithms over complex objects, sru is strictly less powerful than sri. This inefficiency is in contrast to a previous result that uniformly translates efficient sri programs into efficient sru programs, but over a language with higher-order functions. Our third result proves that, in the absence of external functions, higher-order functions do not add more expressive power to the nested relational algebra with sri or sru. However, elimination of higher-order functions cannot be done uniformly, because in the presence of certain external functions, more expressive power can be gained from the higher-order functions. These three results suggest that higher-order functions could be useful in query languages.


Query Language Transitive Closure Expressive Power Complex Object Derivation Tree 
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. 1.
    S. Abiteboul and P. Kanellakis. Database theory column: Query languages for complex object databases. SIGACT News, 21(3):9–18, 1990.Google Scholar
  2. 2.
    S. Abiteboul and C. Beeri. On the power of languages for the manipulation of complex objects. In Proceedings of International Workshop on Theory and Applications of Nested Relations and Complex Objects, Darmstadt, 1988.Google Scholar
  3. 3.
    S. Abiteboul and V. Vianu. Generic computation and its complexity. In Proceedings of 23rd ACM Symposium on the Theory of Computing, 1991.Google Scholar
  4. 4.
    F. Bancilhon, T. Briggs, S. Khoshafian, and P. Valduriez. A powerful and simple database language. In Proceedings of International Conference on Very Large Data Bases, pages 97–105, 1988.Google Scholar
  5. 5.
    R. S. Bird and P. Wadler. Introduction to Functional Programming. Prentice-Hall International, 1988.Google Scholar
  6. 6.
    V. Breazu-Tannen, P. Buneman, and S. Naqvi. Structural recursion as a query language. In Proceedings of 3rd International Workshop on Database Programming Languages, Naphlion, Greece, pages 9–19. Morgan Kaufmann, August 1991.Google Scholar
  7. 7.
    V. Breazu-Tannen and R. Subrahmanyam. Logical and computational aspects of programming with Sets/Bags/Lists. In LNCS 510: Proceedings of 18th International Colloquium on Automata, Languages, and Programming, Madrid, Spain, July 1991, pages 60–75.Google Scholar
  8. 8.
    V. Breazu-Tannen, P. Buneman, and L. Wong. Naturally embedded query languages. In LNCS 646: Proceedings of 4th International Conference on Database Theory, Berlin, Germany, October, 1992, pages 140–154.Google Scholar
  9. 9.
    L. S. Colby. A recursive algebra for nested relations. Information Systems, 15(5):567–582, 1990.Google Scholar
  10. 10.
    L. Colson. About primitive recursive algorithms. Theoretical Computer Science, 83:57–69, 1991.Google Scholar
  11. 11.
    P. L. Curien. The λρ-calculus: An abstract framework for environment machines. Technical Report URA 725, Laboratoire d'Informatique, Departement de Mathematiques et d'Informatique, Ecole Normale Superieure, 45 Rue d'Ulm, 75230 Paris Cedex 05, France, 1988.Google Scholar
  12. 12.
    J.-Y. Girard, Y. Lafont, and P. Taylor. Proofs and Types, volume 7 of Combridge Tracts in Theoretical Computer Science. Cambridge University Press, Cambridge, 1989.Google Scholar
  13. 13.
    R. Hull. Relative information capacity of simple relational database schemata. SIAM Journal of Computing, 15(3):865–886, August 1986.Google Scholar
  14. 14.
    N. Immerman. Length of predicate calculus formulas as a new complexity measure. In Proceedings of 20th Symposium on Foundations of Computer Science, San Juan, Puerto Rico, October 1979, pages 337–347.Google Scholar
  15. 15.
    L. Libkin and L. Wong. Some properties of query languages for bags. In Proceedings of 4th International Workshop on Database Programming Languages, New York, August 1993, pages 97–114.Google Scholar
  16. 16.
    P. Odifreddi. Classical Recursion Theory. North Holland, 1989.Google Scholar
  17. 17.
    A. Ohori, P. Buneman, and V. Breazu-Tannen. Database programming in Machiavelli, a polymorphic language with static type inference. In Proceedings of ACM-SIGMOD International Conference on Management of Data, pages 46–57, Portland, Oregon, June 1989.Google Scholar
  18. 18.
    H.-J. Schek and M. H. Scholl. The relational model with relation-valued attributes. Information Systems, 11(2):137–147, 1986.Google Scholar
  19. 19.
    D. Stemple and T. Sheard. A recursive base for database programming. In LNCS 504: Next Generation Information System Technology, pages 311–332, Berlin, 1990.Google Scholar
  20. 20.
    D. Suciu and V. Breazu-Tannen. A query language for NC. In Proceedings of 13th ACM Symposium on Principles of Database Systems, pages 167–178, Minneapolis, Minnesota, May 1994.Google Scholar
  21. 21.
    D. Suciu and J. Paredaens. Any algorithm in the complex object algebra needs exponential space to compute transitive closure. In Proceedings of 13th ACM Symposium on Principles of Database Systems, pages 201–209, Minneapolis, Minnesota, May 1994.Google Scholar
  22. 22.
    S. J. Thomas and P. C. Fischer. Nested relational structures. In Advances in Computing Research: The Theory of Databases, pages 269–307, London, England, 1986. JAI Press.Google Scholar
  23. 23.
    L. Wong. Normal forms and conservative properties for query languages over collection types. In Proceedings of 12th ACM Symposium on Principles of Database Systems, pages 26–36, Washington, D. C., May 1993.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1995

Authors and Affiliations

  • Dan Suciu
    • 1
  • Limsoon Wong
    • 2
  1. 1.University of PennsylvaniaPhiladelphia
  2. 2.Institute of Systems ScienceSingapore

Personalised recommendations