Normal Forms and Conservative Extension Properties for Query Languages over Collection Types

Strong normalization results are obtained for a general language for collection types. An induced normal form for sets and bags is then used to show that the class of functions whose input has height (that is, the maximal depth of nestings of sets/bags/lists in the complex object) at mostiand output has height at mostodefinable in a nested relational query language withoutpowersetoperator isindependentof the height of intermediate expressions used. Our proof holds regardless of whether the language is used for querying sets, bags, or lists, even in the presence of variant types. Moreover, the normal forms are useful in a general approach to query optimization. Paredaens and Van Gucht (ACM Trans on Database Systems17, No.?1 (1992), 65?93), proved a similar result for the special case wheni=o=1. Their result is complemented by Hull and Su (J. Comput. Systems Sci.43(1991), 219?261) who demonstrated the failure of independence when powerset operator is present andi=o=1. The theorem of Hull and Su was generalized to alliandoby Grumbach and Vianu (in“Proceedings of the 3rd International Conference on Database Theory,” Lecture Notes in Computer Science, Vol.?470, Springer-Verlag, Berlin, 1990). Our result generalizes Paredaens and Van Gucht's to alliando, providing a counterpart to the theorem of Grumbach and Vianu.

[1]  Carl A. Gunter Semantics of programming languages: structures and techniques , 1993, Choice Reviews Online.

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

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

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

[5]  Herbert B. Enderton,et al.  A mathematical introduction to logic , 1972 .

[6]  Dirk Van Gucht,et al.  Converting nested algebra expressions into flat algebra expressions , 1992, TODS.

[7]  Silvio Micali,et al.  Advances in Computing Research: The Theory of Databases , 1986 .

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

[9]  Philip Wadler,et al.  Comprehending monads , 1990, Mathematical Structures in Computer Science.

[10]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..

[11]  Richard Hull,et al.  The Format Model: A Theory of database Organization , 1984, J. ACM.

[12]  Limsoon Wong,et al.  Conservativity of Nested Relational Calculi with Internal Generic Functions , 1994, Inf. Process. Lett..

[13]  Limsoon Wong,et al.  New techniques for studying set languages, bag languages and aggregate functions , 1994, PODS '94.

[14]  H. Gaifman On Local and Non-Local Properties , 1982 .

[15]  Catriel Beeri,et al.  An Introduction to the Completeness of Languages for Complex Objects and Nested Relations , 1987, NF².

[16]  Hans-Jörg Schek,et al.  Remarks on the algebra of non first normal form relations , 1982, PODS.

[17]  Marc Gyssens,et al.  A Comparison between Algebraic Query Languages for Flat and Nested Databases , 1991, Theor. Comput. Sci..

[18]  Philip Wadler,et al.  Listlessness is better than laziness: Lazy evaluation and garbage collection at compile-time , 1984, LFP '84.

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

[20]  Philip W. Trinder,et al.  Comprehensions, a Query Notation for DBPLs , 1992, DBPL.

[21]  Robin Milner,et al.  Definition of standard ML , 1990 .

[22]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[23]  D. A. Turner,et al.  Miranda: A Non-Strict Functional language with Polymorphic Types , 1985, FPCA.

[24]  John C. Mitchell,et al.  ML with extended pattern matching and subtypes , 1988, LISP and Functional Programming.

[25]  Philip Wadler Listlessness is better than laziness II: composing listless functions , 1985, Programs as Data Objects.

[26]  Serge Abiteboul,et al.  IFO: a formal semantic database model , 1987, TODS.

[27]  Richard Hull,et al.  The format model: a theory of database organization , 1982, JACM.

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

[29]  Jianwen Su,et al.  On the expressive power of database queries with intermediate types , 1988, PODS '88.

[30]  Limsoon Wong,et al.  Aggregate Functions, Conservative Extensions, and Linear Orders , 1993, DBPL.

[31]  Didier Rémy,et al.  Type checking records and variants in a natural extension of ML , 1989, POPL '89.

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

[33]  Peter Buneman,et al.  A study of semantics, types and languages for databases and object-oriented programming , 1989 .

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