講演・口頭発表等

2017年1月2日

Language-integrated query with ordering, grouping and outer joins

PEPM 2017 - Proceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2017
  • Tatsuya Katsushima
  • ,
  • Oleg Kiselyov

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.

リンク情報
URL
https://www.scopus.com/inward/record.uri?partnerID=HzOxMe3b&scp=85010440825&origin=inward
DOI
https://doi.org/10.1145/3018882.3018893