计算机科学 > 程序设计语言
[提交于 2021年7月20日]
标题:Language-Integrated Updatable Views (Extended version)
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Relational lenses are a modern approach to the view update problem in relational databases. As introduced by Bohannon et al. (2006), relational lenses allow the definition of updatable views by the composition of lenses performing individual transformations. Horn et al. (2018) provided the first implementation of incremental relational lenses, which demonstrated that relational lenses can be implemented efficiently by propagating changes to the database rather than replacing the entire database state. However, neither approach proposes a concrete language design; consequently, it is unclear how to integrate lenses into a general-purpose programming language, or how to check that lenses satisfy the well-formedness conditions needed for predictable behaviour. In this paper, we propose the first full account of relational lenses in a functional programming language, by extending the Links web programming language. We provide support for higher-order predicates, and provide the first account of typechecking relational lenses which is amenable to implementation. We prove the soundness of our typing rules, and illustrate our approach by implementing a curation interface for a scientific database application.
提交历史
来自:Simon Fowler[v1] 2021年7月20日 星期二 00:00:00 UTC