We describe Query Defunctionalization which enables off-the-shelf first-order database engines to process queries over first-class functions. Support for first-class functions is characterized by the ability to treat functions like regular data items that can be constructed at query runtime, passed to or returned from other (higher-order) functions, assigned to variables, and stored in persistent data structures. Query defunctionalization is a non-invasive approach that transforms such function-centric queries into the data-centric operations implemented by common query processors. Experiments with XQuery and PL/SQL database systems demonstrate that first-order database engines can faithfully and efficiently support the expressive "functions as data" paradigm.
翻译:我们描述“查询分解功能”使现成的第一阶数据库引擎能够处理头等功能的查询。支持头等功能的特点是有能力处理功能,如在查询运行时可以建造、传给其他(高阶)功能或从其他(高阶)功能中返回、分配给变量并存储在持久性数据结构中的常规数据项。“查询分解功能”是一种非侵入性方法,将这种以功能为中心的查询转换成由通用查询处理器执行的以数据为中心的操作。与 XQuery 和 PL/SQL 数据库系统的实验表明,第一阶数据库引擎可以忠实和有效地支持“数据功能”的表达式。