On Two Forms of Structural Recursion

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.

[1]  Dan Suciu,et al.  Any algorithm in the complex object algebra with powerset needs exponential space to compute transitive closure , 1994, PODS '94.

[2]  Dan Suciu,et al.  A Query Language for NC , 1994, LCC.

[3]  Peter Buneman,et al.  Database programming in Machiavelli—a polymorphic language with static type inference , 1989, SIGMOD '89.

[4]  Catriel Beeri,et al.  On the power of languages for manipulation of complex objects , 1987, VLDB 1987.

[5]  Neil Immerman,et al.  Length of predicate calculus formulas as a new complexity measure , 1979, 20th Annual Symposium on Foundations of Computer Science (sfcs 1979).

[6]  Matthew Hennessy,et al.  Semantics of programming languages - an elementary introduction using structural operational semantics , 1990 .

[7]  Patrick C. Fischer,et al.  Nested Relational Structures , 1986, Adv. Comput. Res..

[8]  Peter Buneman,et al.  Structural Recursion as a Query Language , 1992, DBPL.

[9]  Limsoon Wong,et al.  Querying Nested Collections , 1994 .

[10]  David W. Stemple,et al.  A Recursive Base for Database Programming Primitives , 1990, East/West Database Workshop.

[11]  J. Girard,et al.  Proofs and types , 1989 .

[12]  Loïc Colson About Primitive Recursive Algorithms , 1989, ICALP.

[13]  Hans-Jörg Schek,et al.  The relational model with relation-valued attributes , 1986, Inf. Syst..

[14]  Richard S. Bird,et al.  Introduction to functional programming , 1988, Prentice Hall International series in computer science.

[15]  Paris C. Kanellakis,et al.  Database Theory Column: Query Languages for Complex Object Databases. , 1990 .

[16]  Limsoon Wong,et al.  Naturally Embedded Query Languages , 1992, ICDT.

[17]  Pierre-Louis Curien,et al.  An Abstract Framework for Environment Machines , 1991, Theor. Comput. Sci..

[18]  Limsoon Wong,et al.  Normal forms and conservative properties for query languages over collection types , 1993, PODS.

[19]  Patrick Valduriez,et al.  FAD, a Powerful and Simple Database Language , 1987, VLDB.

[20]  Val Tannen,et al.  Logical and Computational Aspects of Programming with Sets/Bags/Lists , 1991, ICALP.

[21]  P. Odifreddi Classical recursion theory , 1989 .

[22]  Richard Hull,et al.  Relative information capacity of simple relational database schemata , 1984, SIAM J. Comput..

[23]  Latha S. Colby A recursive algebra for nested relations , 1990, Inf. Syst..

[24]  Limsoon Wong,et al.  Some Properties of Query Languages for Bags , 1993, DBPL.

[25]  Serge Abiteboul,et al.  Database theory column , 1989, SIGA.

[26]  Serge Abiteboul,et al.  Generic Computation and its complexity , 1991, STOC '91.