Strongly Normalizing Higher-Order Relational Queries

W. Ricciotti, J. Cheney
{"title":"Strongly Normalizing Higher-Order Relational Queries","authors":"W. Ricciotti, J. Cheney","doi":"10.46298/lmcs-18(3:23)2022","DOIUrl":null,"url":null,"abstract":"Language-integrated query is a powerful programming construct allowing\ndatabase queries and ordinary program code to interoperate seamlessly and\nsafely. Language-integrated query techniques rely on classical results about\nthe nested relational calculus, stating that its queries can be algorithmically\ntranslated to SQL, as long as their result type is a flat relation. Cooper and\nothers advocated higher-order nested relational calculi as a basis for\nlanguage-integrated queries in functional languages such as Links and F#.\nHowever, the translation of higher-order relational queries to SQL relies on a\nrewrite system for which no strong normalization proof has been published: a\nprevious proof attempt does not deal correctly with rewrite rules that\nduplicate subterms. This paper fills the gap in the literature, explaining the\ndifficulty with a previous proof attempt, and showing how to extend the\n$\\top\\top$-lifting approach of Lindley and Stark to accommodate duplicating\nrewrites. We also show how to extend the proof to a recently-introduced\ncalculus for heterogeneous queries mixing set and multiset semantics.","PeriodicalId":314387,"journal":{"name":"Log. Methods Comput. Sci.","volume":"82 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-11-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"7","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Log. Methods Comput. Sci.","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.46298/lmcs-18(3:23)2022","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 7

Abstract

Language-integrated query is a powerful programming construct allowing database queries and ordinary program code to interoperate seamlessly and safely. Language-integrated query techniques rely on classical results about the nested relational calculus, stating that its queries can be algorithmically translated to SQL, as long as their result type is a flat relation. Cooper and others advocated higher-order nested relational calculi as a basis for language-integrated queries in functional languages such as Links and F#. However, the translation of higher-order relational queries to SQL relies on a rewrite system for which no strong normalization proof has been published: a previous proof attempt does not deal correctly with rewrite rules that duplicate subterms. This paper fills the gap in the literature, explaining the difficulty with a previous proof attempt, and showing how to extend the $\top\top$-lifting approach of Lindley and Stark to accommodate duplicating rewrites. We also show how to extend the proof to a recently-introduced calculus for heterogeneous queries mixing set and multiset semantics.
强规范化高阶关系查询
语言集成查询是一种强大的编程结构,允许数据库查询和普通程序代码无缝安全地互操作。语言集成查询技术依赖于关于嵌套关系演算的经典结果,表明只要其结果类型是平面关系,其查询就可以通过算法转换为SQL。Cooper和其他人提倡将高阶嵌套关系演算作为函数式语言(如Links和f#)中语言集成查询的基础。然而,将高阶关系查询转换为SQL依赖于没有发布强规范化证明的重写系统:先前的证明尝试不能正确处理重复子条款的重写规则。本文填补了文献中的空白,用先前的证明尝试解释了困难,并展示了如何扩展Lindley和Stark的$\top\top$-lifting方法以适应重复重写。我们还展示了如何将证明扩展到最近引入的混合集和多集语义的异构查询演算。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信