A practical theory of language-integrated query

James Cheney, Sam Lindley, Philip Wadler

Research output: Chapter in Book/Report/Conference proceedingConference contribution

51 Citations (Scopus)

Abstract

Language-integrated query is receiving renewed attention, in part because of its support through Microsoft's LINQ framework. We present a practical theory of language-integrated query based on quotation and normalisation of quoted terms. Our technique supports join queries, abstraction over values and predicates, composition of queries, dynamic generation of queries, and queries with nested intermediate data. Higher-order features prove useful even for constructing first-order queries. We prove a theorem characterising when a host query is guaranteed to generate a single SQL query. We present experimental results confirming our technique works, even in situations where Microsoft's LINQ framework either fails to produce an SQL query or, in one case, produces an avalanche of SQL queries.

Original languageEnglish
Title of host publicationICFP '13: Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
PublisherAssociation for Computing Machinery
Pages403-416
Number of pages14
ISBN (Print)9781450323260
DOIs
Publication statusPublished - Nov 2013
Event18th ACM SIGPLAN International Conference on Functional Programming 2013 - Boston, MA, United States
Duration: 25 Sept 201327 Sept 2013

Conference

Conference18th ACM SIGPLAN International Conference on Functional Programming 2013
Abbreviated titleICFP 2013
Country/TerritoryUnited States
CityBoston, MA
Period25/09/1327/09/13

Keywords

  • Antiquotation
  • F#
  • Lambda calculus
  • LINQ
  • Quotation
  • SQL

ASJC Scopus subject areas

  • Software

Fingerprint

Dive into the research topics of 'A practical theory of language-integrated query'. Together they form a unique fingerprint.

Cite this