Developing high-performance applications that interact with databases is a difficult task, as developers need to understand both the details of the language in which their applications are written in, and also the intricacies of the relational model. One popular solution to this problem is the use of object-relational mapping (ORM) libraries that provide transparent access to the database using the same language that the application is written in. Unfortunately, using such frameworks can easily lead to applications with poor performance because developers often end up implementing relational operations in application code, and doing so usually does not take advantage of the optimized implementations of relational operations, efficient query plans, or push down of predicates that database systems provide. In this paper we present QBS, an algorithm that automatically identifies fragments of application logic that can be pushed into SQL queries. The QBS algorithm works by automatically synthesizing invariants and postconditions for the original code fragment. The postconditions and invariants are expressed using a theory of ordered relations that allows us to reason precisely about the contents and order of the records produced even by complex code fragments that compute joins and aggregates. The theory is close in expressiveness to SQL, so the synthesized postconditions can be readily translated to SQL queries. Using 40 code fragments extracted from over 120k lines of open-source code written using the Java Hibernate ORM, we demonstrate that our approach can convert a variety of imperative constructs into relational specifications.


翻译:开发与数据库互动的高性能应用程序是一项困难的任务,因为开发者需要了解其应用程序在其中写成的语言的详细细节,以及关系模型的复杂性。这个问题的一个普遍解决办法是使用对象关系映射(ORM)图书馆,这些图书馆使用与应用程序所写语言相同的语言透明地访问数据库。不幸的是,使用这种框架很容易导致应用性能差,因为开发者往往在应用代码中执行关系操作,而这样做通常不会利用关系操作的最佳实施、高效查询计划或数据库系统提供的上游数据。在这个文件中,我们介绍了QBS,一种自动识别应用逻辑碎片的算法,可以将其推入SQL查询中。QBS算法的工作是自动合成变量和原代码碎片的后缀。根据一种有秩序的关系的理论来表达后缀和变异性,使得我们能够精确地了解即使由复杂代码碎片生成的内容和顺序,从而能够将精度合并成40号,并且能够将S-BS-L的逻辑转换成一个快速的解算法。可以将我们的代码转换成一个快速的S-L的解算法,可以将我们快速地转换成一个快速的解算。

0
下载
关闭预览

相关内容

SQL 全名是结构化查询语言,是用于数据库中的标准数据查询语言,IBM 公司最早使用在其开发的数据库系统中。
因果图,Causal Graphs,52页ppt
专知会员服务
248+阅读 · 2020年4月19日
深度强化学习策略梯度教程,53页ppt
专知会员服务
183+阅读 · 2020年2月1日
【干货】大数据入门指南:Hadoop、Hive、Spark、 Storm等
专知会员服务
96+阅读 · 2019年12月4日
《DeepGCNs: Making GCNs Go as Deep as CNNs》
专知会员服务
31+阅读 · 2019年10月17日
强化学习最新教程,17页pdf
专知会员服务
177+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
机器学习相关资源(框架、库、软件)大列表
专知会员服务
40+阅读 · 2019年10月9日
计算机 | 入门级EI会议ICVRIS 2019诚邀稿件
Call4Papers
10+阅读 · 2019年6月24日
Hierarchically Structured Meta-learning
CreateAMind
26+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
28+阅读 · 2019年5月18日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
42+阅读 · 2019年1月3日
MoCoGAN 分解运动和内容的视频生成
CreateAMind
18+阅读 · 2017年10月21日
【学习】(Python)SVM数据分类
机器学习研究会
6+阅读 · 2017年10月15日
【推荐】RNN/LSTM时序预测
机器学习研究会
25+阅读 · 2017年9月8日
【推荐】图像分类必读开创性论文汇总
机器学习研究会
14+阅读 · 2017年8月15日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Adversarial Mutual Information for Text Generation
Arxiv
13+阅读 · 2020年6月30日
Embedding Logical Queries on Knowledge Graphs
Arxiv
3+阅读 · 2019年2月19日
Arxiv
20+阅读 · 2018年1月17日
Arxiv
5+阅读 · 2017年11月30日
VIP会员
相关VIP内容
因果图,Causal Graphs,52页ppt
专知会员服务
248+阅读 · 2020年4月19日
深度强化学习策略梯度教程,53页ppt
专知会员服务
183+阅读 · 2020年2月1日
【干货】大数据入门指南:Hadoop、Hive、Spark、 Storm等
专知会员服务
96+阅读 · 2019年12月4日
《DeepGCNs: Making GCNs Go as Deep as CNNs》
专知会员服务
31+阅读 · 2019年10月17日
强化学习最新教程,17页pdf
专知会员服务
177+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
机器学习相关资源(框架、库、软件)大列表
专知会员服务
40+阅读 · 2019年10月9日
相关资讯
计算机 | 入门级EI会议ICVRIS 2019诚邀稿件
Call4Papers
10+阅读 · 2019年6月24日
Hierarchically Structured Meta-learning
CreateAMind
26+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
28+阅读 · 2019年5月18日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
42+阅读 · 2019年1月3日
MoCoGAN 分解运动和内容的视频生成
CreateAMind
18+阅读 · 2017年10月21日
【学习】(Python)SVM数据分类
机器学习研究会
6+阅读 · 2017年10月15日
【推荐】RNN/LSTM时序预测
机器学习研究会
25+阅读 · 2017年9月8日
【推荐】图像分类必读开创性论文汇总
机器学习研究会
14+阅读 · 2017年8月15日
Auto-Encoding GAN
CreateAMind
7+阅读 · 2017年8月4日
Top
微信扫码咨询专知VIP会员