ABSTRACT
Complex database queries, like programs in general, can "crash", i.e., can raise runtime errors. We want to avoid crashes without losing expressive power, or we want to correctly predict the absence of crashes. We show how concepts and techniques from programming language theory, notably type systems and reflection, can be adaptedto this end. Of course, the specific nature of database queries (asopposed to general programs), also requires some new methods, andraises new questions.
- S. Abiteboul, R. Hull, and V. Vianu. Foundations of Databases. Addison-Wesley, 1995. Google Scholar
Digital Library
- Serge Abiteboul, Rakesh Agrawal, Phil Bernstein, Mike Carey, Stefano Ceri, Bruce Croft, David DeWitt, Mike Franklin, Hector Garcia Molina, Dieter Gawlick, Jim Gray, Laura Haas, Alon Halevy, Joe Hellerstein, Yannis Ioannidis, Martin Kersten, Michael Pazzani, Mike Lesk, David Maier, Jeff Naughton, Hans Schek, Timos Sellis, Avi Silberschatz, Mike Stonebraker, Rick Snodgrass, Jeff Ullman, Gerhard Weikum, Jennifer Widom, and Stan Zdonik. The Lowell database research self-assessment. Commun. ACM, 48(5):111--118, 2005 Google Scholar
Digital Library
- Noga Alon, Tova Milo, Frank Neven, Dan Suciu, and Victor Vianu. Typechecking XML views of relational databases. ACM Transactions on Computational Logic, 4(3):315--354, 2003. Google Scholar
Digital Library
- Noga Alon, Tova Milo, Frank Neven, Dan Suciu, and Victor Vianu. XML with data values: typechecking revisited. Journal of Computer and System Sciences, 66(4):688--727, 2003. Google Scholar
Digital Library
- Henk P. Barendregt. The Lambda Calculus: its Syntax and Semantics. North-Holland, 1984.Google Scholar
- Scott Boag, Don Chamberlin, Mary F. Fernández, Daniela Florescu, Jonathan Robie, and Jérôme Siméon. XQuery 1.0: An XML Query Language. W3C Working Draft, February 2005.Google Scholar
- Don Box and Anders Hejlsberg. The LINQ Project: .NET Language Integrated Query. http://msdn.microsoft.com/netframework/future/linq/, March 2006.Google Scholar
- Peter Buneman, Susan B. Davidson, Mary F. Fernandez, and Dan Suciu. Adding structure to unstructured data. In Foto N. Afrati and Phokion Kolaitis, editors, Database Theory--ICDT'97, 6th International Conference, volume 1186, pages 336--350, Delphi, Greece, 1997. Springer. Google Scholar
Digital Library
- Peter Buneman, Shamim A. Naqvi, Val Tannen, and Limsoon Wong. Principles of programming with complex objects and collection types. Theoretical Computer Science, 149(1):3--48, 1995. Google Scholar
Digital Library
- Peter Buneman and Atsushi Ohori. Polymorphism and type inference in database programming. ACM Transactions on Database Systems, 21(1):30--76, 1996. Google Scholar
Digital Library
- C. Calcagno, E. Moggi, and T. Sheard. Closed types for a safe imperative MetaML. Journal of Functional Programming, 13(3):545--571, 2003. Google Scholar
Digital Library
- Luca Cardelli. Type systems. In The Computer Science and Engineering Handbook, pages 2208--2236. CRC Press, 1997.Google Scholar
- R. G. G. Cattell, Douglas K. Barry, Mark Berler, Jeff Eastman, David Jordan, Craig Russell, Olaf Schadow, Torsten Stanienda, and Fernando Velez, editors. The Object Data Standard: ODMG 3.0. Morgan Kaufmann, 2000. Google Scholar
Digital Library
- W. Chen, M. Kifer, and D. S. Warren. HiLog: A foundation for higher-order logic programming. Journal of Logic Programming, 15(3):187--230, 1993. Google Scholar
Digital Library
- Luis Damas and Robin Milner. Principal type-schemes for functional programs. In POPL '82: Proceedings of the 9th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 207--212, New York, NY, USA, 1982. ACM Press. Google Scholar
Digital Library
- Denise Draper, Peter Fankhauser, Mary F. Fernández, Ashok Malhotra, Kristoffer Rose, Michael Rys, Jérôme Siméon, and Philip Wadler. XQuery 1.0 and XPath 2.0 Formal Semantics. W3C Working Draft, February 2005.Google Scholar
- Mary F. Fernández, Ashok Malhotra, Jonathan Marsh, Marton Nagy, and Norman Walsh. XQuery 1.0 and XPath 2.0 Data Model. W3C Working Draft, February 2005.Google Scholar
- Alain Frisch, Giuseppe Castagna, and Véronique Benzaken. CDuce: an XML-centric general-purpose language. In Proceedings of the eighth ACM SIGPLAN International Conference on Functional Programming, pages 51--63. ACM Press, 2003. Google Scholar
Digital Library
- D. Gawlick, D. Lenkov, A. Yalamanchi, et al. Applications for expression data in relational database systems. In Proceedings 20th International Conference on Data Engineering, pages 609--620. IEEE Computer Society, 2004. Google Scholar
Digital Library
- Roy Goldman and Jennifer Widom. Dataguides: Enabling query formulation and optimization in semistructured databases. In VLDB'97 Proceedings of 23rd International Conference on Very Large Data Bases, pages 436--445, 1997. Google Scholar
Digital Library
- M. Gyssens and L. V. S. Lakshmanan. A foundation for multi-dimensional databases. In Proceedings 23rd International Conference on Very Large Data Bases, pages 106--115. Morgan Kaufmann, 1997. Google Scholar
Digital Library
- Roger Hindley. The principal type-scheme of an object in combinatory logic. Transactions of the American Mathematical Society, 146:29--60, December 1969.Google Scholar
- Haruo Hosoya and Benjamin C. Pierce. XDuce: A statically typed XML processing language. ACM Transactions on Internet Technology (TOIT), 3(2):117--148, 2003. Google Scholar
Digital Library
- Haruo Hosoya, Jérôme Vouillon, and Benjamin C. Pierce. Regular expression types for XML. ACM Transactions on Programming Languages and Systems, 27(1):46--90, 2005. Google Scholar
Digital Library
- M. Jain, A. Mendhekar, and D. Van Gucht. A uniform data model for relational data and meta-data query processing. In Advances in Data Management '95, pages 146--165. Tata McGraw-Hill, 1995.Google Scholar
- Christoph Koch. On the complexity of nonrecursive xquery and functional query languages on complex values. ACM Trans. Database Syst., 31(4):1215--1256, 2006. Google Scholar
Digital Library
- L. V. S. Lakshmanan, F. Sadri, and S. N. Subramanian. SchemaSQL: An extension to SQL for multidatabase interoperability. ACM Transactions on Database Systems, 26(4):476--519, 2001. Google Scholar
Digital Library
- Zi Lin, Bingsheng He, and Byron Choi. A quantitative summary of XML structures. In ER 2006 - 25th International Conference on Conceptual Modeling, volume 4215 of Lecture Notes in Computer Science, pages 228--240. Springer, 2006. Google Scholar
Digital Library
- Sebastian Maneth, Alexandru Berlea, Thomas Perst, and Helmut Seidl. XML type checking with macro tree transducers. In Chen Li, editor, PODS, pages 283--294. ACM, 2005. Google Scholar
Digital Library
- Sebastian Maneth, Thomas Perst, and Helmut Seidl. Exact XML type checking in polynomial time. In Schwentick and Suciu {41}, pages 254--268.Google Scholar
- Wim Martens and Frank Neven. Frontiers of tractability for typechecking simple XML transformations. In Proceedings of the Twenty-third ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, pages 23--34. ACM Press, 2004. Google Scholar
Digital Library
- Wim Martens and Frank Neven. On the complexity of typechecking top-down XML transformations. Theor. Comput. Sci., 336(1):153--180, 2005. Google Scholar
Digital Library
- Jim Melton. Understanding SQL's Stored Procedures. Morgan Kaufmann, San Mateo, CA, USA, 1998. Google Scholar
Digital Library
- Robin Milner. A theory of type polymorphism in programming. J. Comput. Syst. Sci., 17(3):348--375, 1978.Google Scholar
- Tova Milo, Dan Suciu, and Victor Vianu. Typechecking for XML transformers. In Proceedings of the Nineteenth ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, pages 11--22. ACM Press, 2000. Google Scholar
Digital Library
- F. Neven, J. Van den Bussche, D. Van Gucht, and G. Vossen. Typed query languages for databases containing queries. Information Systems, 24(7):569--595, 1999. Google Scholar
Digital Library
- Atsushi Ohori. A polymorphic record calculus and its compilation. ACM Transactions on Programming Languages and Systems, 17(6):844--895, 1995. Google Scholar
Digital Library
- Benjamin C. Pierce. Types and Programming Languages. MIT Press, 2002. Google Scholar
Digital Library
- Didier Rémy. Type inference for records in a natural extension of ML. In Carl A. Gunter and John C. Mitchell, editors, Theoretical Aspects Of Object-Oriented Programming. Types, Semantics and Language Design. MIT Press, 1993. Google Scholar
Digital Library
- K. Ross. Relations with relation names as arguments: Algebra and calculus. In Proceedings 11th ACM Symposium on Principles of Database Systems, pages 346--353, 1992. Google Scholar
Digital Library
- Thomas Schwentick and Dan Suciu, editors. Database Theory - ICDT 2007, 11th International Conference, Barcelona, Spain, January 10--12, 2007, Proceedings, volume 4353 of Lecture Notes in Computer Science. Springer, 2007. Google Scholar
Digital Library
- H. Schwichtenberg. Definierbare funktionen in λ-kalkül mit typen. Archiv für mathematische Logik und Grundlagenforschung, 174:113--114, 1976.Google Scholar
- M. Stonebraker et al. QUEL as a data type. In B. Yormark, editor, Proceedings of SIGMOD 84 Annual Meeting, volume 14:2 of SIGMOD Record, pages 208--214. ACM Press, 1984. Google Scholar
Digital Library
- M. Stonebraker et al. Extending a database system with procedures. ACM Transactions on Database Systems, 12(3):350--376, 1987. Google Scholar
Digital Library
- Dan Suciu. Typechecking for semistructured data. In Database Programming Languages, 8th International Workshop, DBPL 2001, Revised Papers, volume 2397 of Lecture Notes in Computer Science, pages 1--20. Springer-Verlag, 2001. Google Scholar
Digital Library
- Martin Sulzmann. A General Framework for Hindley/Milner Type Systems with Constraints. PhD thesis, Yale University, 2000. Google Scholar
Digital Library
- Martin Sulzmann. A general type inference framework for Hindley/Milner style systems. In Functional and Logic Programming: FLOPS 2001, volume 2024 of Lecture Notes in Computer Science, pages 248--263. Springer-Verlag, 2001. Google Scholar
Digital Library
- W. Taha and T. Sheard. MetaML and multi-stage programming with explicit annotations. Theoretical Computer Science, 248(1-2):211--242, 2000. Google Scholar
Digital Library
- Wolfgang Thomas. Languages, Automata, and Logic, volume 3 of Handbook of Formal Languages, chapter 7, pages 389--456. Springer, 1997. Google Scholar
Digital Library
- Henry S. Thompson, David Beech, Murray Maloney, and Noah Mendelsohn. XML Schema Part 1: Structures. W3C Recommendation, May 2001.Google Scholar
- J. Van den Bussche, D. Van Gucht, and G. Vossen. Reflective programming in the relational algebra. Journal of Computer and System Sciences, 52(3):537--549, June 1996. Google Scholar
Digital Library
- J. Van den Bussche, S. Vansummeren, and G. Vossen. Meta-SQL: Towards practical meta-querying. In Advances in Database Technology--EDBT 2004, volume 2992 of Lecture Notes in Computer Science, pages 823--825. Springer, 2004.Google Scholar
- J. Van den Bussche, S. Vansummeren, and G. Vossen. Towards practical meta-querying. Information Systems, 30(4):317--332, 2005. Google Scholar
Digital Library
- J. Van den Bussche and E. Waller. Polymorphic type inference for the relational algebra. Journal of Computer and System Sciences, 64:694--718, 2002.Google Scholar
Digital Library
- Jan Van den Bussche, Dirk Van Gucht, and Stijn Vansummeren. Well-definedness and semantic type checking for the nested relational calculus. Theoretical Computer Science, 371(3):183--199, 2007. Google Scholar
Digital Library
- Jan Van den Bussche and Stijn Vansummeren. Polymorphic type inference for the named nested relational calculus. ACM Transactions on Computational Logic, To appear.Google Scholar
- Stijn Vansummeren. Deciding well-definedness of XQuery fragments. In Proceedings of the twenty-fourth ACM SIGMOD-SIGACT-SIGART symposium on Principles of database systems, pages 37--48, New York, NY, USA, 2005. ACM Press. Google Scholar
Digital Library
- Stijn Vansummeren. On deciding well-definedness for query languages on trees. Technical report, Hasselt University, 2005.Google Scholar
- Stijn Vansummeren. On the complexity of deciding typability in the relational algebra. Acta Informatica, 41(6):367--381, 2005. Google Scholar
Digital Library
- M. Vardi. The complexity of relational query languages. In Proceedings 14th ACM Symposium on the Theory of Computing, pages 137--146, 1982. Google Scholar
Digital Library
- Mitchell Wand. Type inference for record concatenation and multiple inheritance. Information and Computation, 93(1):1--15, 1991. Google Scholar
Digital Library
- Piotr Wieczorek. Complexity of typechecking XML views of relational databases. In Schwentick and Suciu {41}, pages 239--253.Google Scholar
- Limsoon Wong. Kleisli, a functional query system. Journal of Functional Programming, 10(1):19--56, 2000. Google Scholar
Digital Library
- C.M. Wyss and E.L. Robertson. Relational languages for metadata integration. ACM Transactions on Database Systems, 30(2):624--660, 2005. Google Scholar
Digital Library
- XML syntax for XQuery 1.0 (XQueryX). W3C Working Draft 19 December 2003.Google Scholar
Index Terms
A crash course on database queries
Recommendations
Java bytecode as a typed term calculus
PPDP '02: Proceedings of the 4th ACM SIGPLAN international conference on Principles and practice of declarative programmingWe propose a type system for the Java bytecode language, prove the type soundness, and develop a type inference algorithm. In contrast to the existing proposals, our type system yields a typed term calculus similar to type systems of lambda calculi. ...
Typeless programming in Java 5.0 with wildcards
PPPJ '07: Proceedings of the 5th international symposium on Principles and practice of programming in JavaWith the introduction of Java 5.0 [8] the type system has been extended by parameterized types, type variables, type terms, and wildcards. As a result very complex types can arise. The term Vector<? super Vector<? extends List<Integer>>> is for example ...
Typeless programming in Java 5.0
PPPJ '06: Proceedings of the 4th international symposium on Principles and practice of programming in JavaWith the introduction of Java 5.0 [9] the type system has been extended by parameterized types, type variables, type terms, and wildcards. As a result very complex types can arise. The termVector<Vector<AbstractList<Integer>>>is for example a correct ...






Comments