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 language | English |
---|---|
Title of host publication | PEPM 2017 - Proceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, co-located with POPL 2017 |
Publisher | Association for Computing Machinery, Inc |
Pages | 123-124 |
Number of pages | 2 |
ISBN (Electronic) | 9781450347211 |
DOIs | |
Publication status | Published - 2017 Jan 2 |
Event | 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2017 - Paris, France Duration: 2017 Jan 16 → 2017 Jan 17 |
Other
Other | 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2017 |
---|---|
Country/Territory | France |
City | Paris |
Period | 17/1/16 → 17/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