Language-Integrated Query for Temporal Data

Fowler, S. , Galpin, V. and Cheney, J. (2022) Language-Integrated Query for Temporal Data. In: ACM SIGPLAN International Conference on Generative Programming: Concepts & Experiences (GPCE), Auckland, New Zealand, 06-07 Dec 2022, pp. 5-19. ISBN 9781450399203 (doi: 10.1145/3564719.3568690)

[img] Text
282077.pdf - Accepted Version
Available under License Creative Commons Attribution.

3MB

Abstract

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 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, λTLINQ and λ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, λLINQ. We show how existing work on query normalisation supports a surprisingly simple implementation strategy for sequenced joins. We implement our approach in the Links programming language, and describe a non-trivial case study based on curating COVID-19 statistics.

Item Type:Conference Proceedings
Additional Information:We thank the anonymous reviewers for their helpful comments. This work is partially funded by EPSRC Grant EP/T014628/1 (STARDUST), ERC Consolidator Grant 682315 (Skye), and a UK Government ISCF Metrology Fellowship.
Status:Published
Refereed:Yes
Glasgow Author(s) Enlighten ID:Fowler, Dr Simon
Authors: Fowler, S., Galpin, V., and Cheney, J.
College/School:College of Science and Engineering > School of Computing Science
ISBN:9781450399203
Published Online:01 December 2022
Copyright Holders:Copyright © 2022 The Authors
First Published:First published in GPCE 2022: Proceedings of the 21st ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences: 5-19
Publisher Policy:Reproduced in accordance with the publisher copyright policy

University Staff: Request a correction | Enlighten Editors: Update this record

Project CodeAward NoProject NamePrincipal InvestigatorFunder's NameFunder RefLead Dept
306912Session Types for Reliable Distributed SystemsSimon GayEngineering and Physical Sciences Research Council (EPSRC)EP/T014628/1Computing Science