The complexity of higher-order queries

Higher-order transformations are ubiquitous within data management. In relational databases, higher-order queries appear in numerous aspects including query rewriting and query specification. This work investigates languages that combine higher-order transformations with ordinary relational database query languages. We study the two most basic computational problems associated with these query languages - the evaluation problem and the containment problem. We isolate the complexity of evaluation at every order, in an analysis similar to that for that standard typed lambda calculus. We show that the containment problem (and hence, the equivalence problem) is decidable in several important subcases, particularly in the case where query constants and variables range over the positive relational operators. The main decidability result relies on techniques that differ from those used in classical query containment. We also show that the analysis of higher-order queries is closely connected to the evaluation and containment problems for non-recursive Datalog.

[1]  Michael Benedikt,et al.  Complexity of higher-order queries , 2011, ICDT '11.

[2]  Yannis Papakonstantinou,et al.  Expressive Capabilities Description Languages and Query Rewriting Algorithms , 2000, J. Log. Program..

[3]  Alin Deutsch,et al.  Querying Data Sources that Export Infinite Sets of Views , 2011, ICDT '09.

[4]  Nick Koudas,et al.  The design of a query monitoring system , 2009, TODS.

[5]  Michael Benedikt,et al.  Positive higher-order queries , 2010, PODS.

[6]  Michael Kifer,et al.  HILOG: A Foundation for Higher-Order Logic Programming , 1993, J. Log. Program..

[7]  Alon Y. Halevy,et al.  Containment of Nested XML Queries , 2004, VLDB.

[8]  George H. L. Fletcher,et al.  On the Expressive Power of the Relational Algebra on Finite Sets of Relation Pairs , 2009, IEEE Transactions on Knowledge and Data Engineering.

[9]  Jan Paredaens,et al.  On the Expressive Power of the Relational Algebra , 1978, Inf. Process. Lett..

[10]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[11]  Mihalis Yannakakis,et al.  Equivalences Among Relational Expressions with the Union and Difference Operators , 1980, J. ACM.

[12]  Aleksy Schubert The complexity of β-reduction in low orders , 2000 .

[13]  Christoph Koch,et al.  On the complexity of nonrecursive XQuery and functional query languages on complex values , 2006, TODS.

[14]  Serge Abiteboul,et al.  Foundations of Databases , 1994 .

[15]  Torsten Grust,et al.  FERRY: database-supported program execution , 2009, SIGMOD Conference.

[16]  David S. Johnson,et al.  Testing containment of conjunctive queries under functional and inclusion dependencies , 1982, J. Comput. Syst. Sci..

[17]  Jeremy Avigad Eliminating definitions and Skolem functions in first-order logic , 2001, Proceedings 16th Annual IEEE Symposium on Logic in Computer Science.

[18]  Richard Statman,et al.  The typed λ-calculus is not elementary recursive , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

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

[20]  Jan Van den Bussche,et al.  Well-Definedness and Semantic Type-Checking in the Nested Relational Calculus and XQuery Extended Abstract , 2004, ICDT.

[21]  Jan Van den Bussche,et al.  Polymorphic Type Inference for the Relational Algebra , 2001, J. Comput. Syst. Sci..

[22]  Dexter Kozen,et al.  Lower bounds for natural proof systems , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

[23]  Anthony K. H. Tung,et al.  Relaxing join and selection queries , 2006, VLDB.

[24]  Jörg Flum,et al.  Finite model theory , 1995, Perspectives in Mathematical Logic.

[25]  Peter Buneman,et al.  Polymorphism and type inference in database programming , 1996, TODS.

[26]  François Bancilhon,et al.  On the Completeness of Query Languages for Relational Data Bases , 1978, MFCS.

[27]  Limsoon Wong,et al.  Kleisli, a functional query system , 2000, J. Funct. Program..

[28]  J. V. Tucker,et al.  Basic Simple Type Theory , 1997 .

[29]  Georg Gottlob,et al.  The impact of virtual views on containment , 2010, Proc. VLDB Endow..

[30]  Stijn Vansummeren,et al.  Deciding well-definedness of XQuery fragments , 2005, PODS.

[31]  Harry G. Mairson A Simple Proof of a Theorem of Statman , 1992, Theor. Comput. Sci..

[32]  Georg Gottlob,et al.  On the Complexity of Single-Rule Datalog Queries , 1999, LPAR.

[33]  Ronald Fagin,et al.  Inclusion Dependencies and Their Interaction with Functional Dependencies , 1984, J. Comput. Syst. Sci..

[34]  Paris C. Kanellakis,et al.  On the expressive power of simply typed and let-polymorphic lambda calculi , 1996, Proceedings 11th Annual IEEE Symposium on Logic in Computer Science.

[35]  Laks V. S. Lakshmanan,et al.  On the Logical Foundations of Schema Integration and Evolution in Heterogeneous Database Systems , 1993, DOOD.

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

[37]  Gottfried Vossen,et al.  Typed query languages for databases containing queries , 1998, Inf. Syst..

[38]  Kenneth A. Ross Relations with relation names as arguments: algebra and calculus , 1992, PODS '92.

[39]  Harry G. Mairson,et al.  Database Query Languages Embedded in the Typed Lambda Calculus , 1996, Inf. Comput..

[40]  Alfred V. Aho,et al.  Efficient optimization of a class of relational expressions , 1979, TODS.

[41]  Scott Boag,et al.  XQuery 1.0 : An XML Query Language , 2007 .

[42]  Andrei Voronkov,et al.  Complexity of nonrecursive logic programs with complex values , 1998, PODS.

[43]  Jan Van den Bussche,et al.  Well-definedness and semantic type-checking for the nested relational calculus , 2007, Theor. Comput. Sci..

[44]  Sihem Amer-Yahia,et al.  Tree Pattern Relaxation , 2002, EDBT.

[45]  Dan Suciu,et al.  Deciding containment for queries with complex objects (extended abstract) , 1997, PODS '97.

[46]  Gerd G. Hillebrand Finite model theory in the simply typed lambda calculus , 1994 .

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

[48]  Philip Wadler,et al.  Links: Web Programming Without Tiers , 2006, FMCO.

[49]  Georg Gottlob,et al.  Complexity and expressive power of logic programming , 1997, Proceedings of Computational Complexity. Twelfth Annual IEEE Conference.

[50]  Kenneth A. Ross On Negation in HiLog , 1994, J. Log. Program..

[51]  Neil Immerman,et al.  Relational Queries Computable in Polynomial Time , 1986, Inf. Control..

[52]  Ashok K. Chandra,et al.  Optimal implementation of conjunctive queries in relational data bases , 1977, STOC '77.

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

[54]  Ezra Cooper,et al.  The Script-Writer's Dream: How to Write Great SQL in Your Own Language, and Be Sure It Will Succeed , 2009, DBPL.

[55]  Eberhard Karls,et al.  A Ferry-Based Query Backend for the Links Programming Language , 2011 .

[56]  Michael Benedikt,et al.  From XQuery to relational logics , 2009, TODS.

[57]  Jeffrey D. Ullman,et al.  Answering Queries Using Limited External Query Processors , 1999, J. Comput. Syst. Sci..

[58]  Jeffrey D. Ullman,et al.  Answering queries using limited external query processors (extended abstract) , 1996, PODS.

[59]  Thomas Schwentick,et al.  Conjunctive Query Containment over Trees , 2007, DBPL.

[60]  Paris C. Kanellakis,et al.  Functional database query languages as typed lambda calculi of fixed order (extended abstract) , 1994, PODS '94.

[61]  Jan Van den Bussche,et al.  A crash course on database queries , 2007, PODS.

[62]  Moshe Y. Vardi The complexity of relational query languages (Extended Abstract) , 1982, STOC '82.