一句话:提出增量式关系透镜及变更传播语义,并实现语言级可更新视图,实验显示比非增量方案快数个数量级。
透镜是双向变换的一种常用方法,用于解决数据库视图更新问题,即修改源表以反映对视图的期望变更。然而,透镜很少真正用于实现数据库可更新视图;Bohannon、Pierce 和 Vaughan 曾提出关系透镜,但据作者所知此前未被实现或评估。本文提出增量式关系透镜,为其赋予变更传播语义,将视图上的小变更映射为源表上(可能)小的变更。作者还给出了关系透镜的语言集成实现,并进行详细实验评估,表明相较非增量方法有数个数量级的性能提升。该工作说明,无需依赖底层数据库的可更新视图支持,也可在语言层面支持表达力强且高效的视图更新。
Lenses are a popular approach to bidirectional transformations, a generalisation of the view update problem in databases, in which we wish to make changes to source tables to effect a desired change on a view . However, perhaps surprisingly, lenses have seldom actually been used to implement updatable views in databases. Bohannon, Pierce and Vaughan proposed an approach to updatable views called relational lenses , but to the best of our knowledge this proposal has not been implemented or evaluated to date. We propose incremental relational lenses , that equip relational lenses with change-propagating semantics that map small changes to the view to (potentially) small changes to the source tables. We also present a language-integrated implementation of relational lenses and a detailed experimental evaluation, showing orders of magnitude improvement over the non-incremental approach. Our work shows that relational lenses can be used to support expressive and efficient view updates at the language level, without relying on updatable view support from the underlying database.