Language-integrated query with ordering, grouping and outer joins

Tatsuya Katsushima, Oleg Evgenievich Kiselyov

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

2 Citations (Scopus)

Abstract

Language-integrated query systems like T-LINQ or QUEA make relational operations on (generally external) data feel like the ordinary iteration over native arrays. As ordinary programs, queries are type-checked, can be abstracted over and composed. To access relational database systems, queries are eventually translated into well-formed, well-typed and efficient SQL. However, most existing language-integrated query systems implement only a small subset of relational operations supported by modern databases. To make QUEA full-featured, we add to it the operations corresponding to SQL's ORDER BY, LIMIT, OUTER JOIN, GROUP BY and HAVING. We describe the type system and the normalization rules to produce the efficient SQL code. The type system not only ensures by construction the intricate SQL validity constraints. It also prevents the accidental composition of hard-to-optimize queries. Our extended QUEA is embedded in OCaml in the tagless-final style.

Original languageEnglish
Title of host publicationPEPM 2017 - Proceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2017
PublisherAssociation for Computing Machinery, Inc
Pages123-124
Number of pages2
ISBN (Electronic)9781450347211
DOIs
Publication statusPublished - 2017 Jan 2
Event2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2017 - Paris, France
Duration: 2017 Jan 162017 Jan 17

Other

Other2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2017
Country/TerritoryFrance
CityParis
Period17/1/1617/1/17

Keywords

  • EDSL
  • Language-integrated query
  • LINQ
  • SQL
  • Tagless-final

ASJC Scopus subject areas

  • Software
  • Computer Graphics and Computer-Aided Design
  • Computer Vision and Pattern Recognition

Fingerprint

Dive into the research topics of 'Language-integrated query with ordering, grouping and outer joins'. Together they form a unique fingerprint.

Cite this