How to Comprehend Queries Functionally
Author(s) -
Torsten Grust,
Marc H. Scholl
Publication year - 1999
Publication title -
journal of intelligent information systems
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.424
H-Index - 55
eISSN - 1573-7675
pISSN - 0925-9902
DOI - 10.1023/a:1008705026446
Subject(s) - computer science , query language , query optimization , query expansion , rdf query language , programming language , sargable , object query language , sublanguage , web query classification , functional programming , web search query , query by example , compiler , theoretical computer science , information retrieval , search engine
Compilers and optimizers for declarative query languagesuse some form of intermediate language to represent user-levelqueries. The advent of compositional query languages for orthogonaltype systems (e.g., OQL) calls for internal query representationsbeyond extensions of relational algebra. This work adopts a view ofquery processing which is greatly influenced by ideas from thefunctional programming domain. A uniform formal framework ispresented which covers all query translation phases, includinguser-level query language compilation, query optimization, andexecution plan generation. We pursue the type-based design—basedon initial algebras—of a core functional language which isthen developed into an intermediate representation that fits theneeds of advanced query processing. Based on the principle ofstructural recursion we extend the language by monad comprehensions(which provide us with a calculus-style sublanguage that proves to beuseful during the optimization of nested queries) and combinators(abstractions of the query operators implemented by the underlyingtarget query engine). Due to its functional nature, the language issusceptible to program transformation techniques that were developedby the functional programming as well as the functional data modelcommunities. We show how database query processing can substantiallybenefit from these techniques.
Accelerating Research
Robert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom
Address
John Eccles HouseRobert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom