arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2210.12077cs.PL
收藏

时态数据的存储集成查询(扩展版)

Language-Integrated Query for Temporal Data (Extended version)

Simon Fowler, Vashti Galpin, James Cheney

摘要:

现代应用程序经常管理随时间变化的数据。尽管对时态数据库进行了数十年的研究,并最终将时态数据操作添加到SQL:2011标准中,但时态数据查询和操作在大多数主流数据库管理系统中不可用,这使得开发人员不得不从头开始实现这些功能。在本文中,我们扩展了\emph{language-integrated query},以支持编写时态查询和更新在一个统一的主机语言,与语言执行所需的重写,以自动模拟任何标准的关系数据库的时间能力。我们引入两个核心语言,$λ_{\mathsf{TLINQ}}$和$λ_{\mathsf{VLINQ}}$,分别用于操作事务时间和有效时间数据,并正式现有的实现策略,通过提供可证明正确的语义保持翻译成一个非时态的核心语言,$λ_{\mathsf{LINQ}}$。我们将展示如何现有的查询规范化工作支持一个令人惊讶的简单的实现策略\emph{sequenced joins}。我们在链接程序设计语言中实现了我们的方法,并描述了一个基于策划COVID-19统计数据的非平凡案例研究。

英文摘要:

Modern applications often manage time-varying data. Despite decades of research on temporal databases, which culminated in the addition of temporal data operations into the SQL:2011 standard, temporal data query and manipulation operations are unavailable in most mainstream database management systems, leaving developers with the unenviable task of implementing such functionality from scratch. In this paper, we extend \emph{language-integrated query} to support writing temporal queries and updates in a uniform host language, with the language performing the required rewriting to emulate temporal capabilities automatically on any standard relational database. We introduce two core languages, $λ_{\mathsf{TLINQ}}$ and $λ_{\mathsf{VLINQ}}$, for manipulating transaction time and valid time data respectively, and formalise existing implementation strategies by giving provably correct semantics-preserving translations into a non-temporal core language, $λ_{\mathsf{LINQ}}$. We show how existing work on query normalisation supports a surprisingly simple implementation strategy for \emph{sequenced joins}. We implement our approach in the Links programming language, and describe a non-trivial case study based on curating COVID-19 statistics.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑