首页 | 本学科首页   官方微博 | 高级检索  
     

面向数据库模式变更的代码演化推荐方法
引用本文:张武能,李宏伟,沈立炜,赵文耘.面向数据库模式变更的代码演化推荐方法[J].计算机科学,2016,43(2):216-223.
作者姓名:张武能  李宏伟  沈立炜  赵文耘
作者单位:复旦大学计算机科学技术学院 上海201203;上海市数据科学重点实验室复旦大学 上海201203,复旦大学计算机科学技术学院 上海201203;上海市数据科学重点实验室复旦大学 上海201203;江西师范大学计算机信息工程学院 南昌330022,复旦大学计算机科学技术学院 上海201203;上海市数据科学重点实验室复旦大学 上海201203,复旦大学计算机科学技术学院 上海201203;上海市数据科学重点实验室复旦大学 上海201203
基金项目:本文受国家“863”高技术研究发展计划项目(2013AA01A605),国家自然科学基金项目(61402113)资助
摘    要:许多软件依赖数据库来存储信息。数据库模式的变更可能导致程序代码中与数据库相关的SQL语句代码不能正常执行,因而找出一种能够直接定位到需要修改的SQL语句代码并推荐出这些代码可能的修改方案的方法是十分必要的。提出的面向数据库模式变更的代码演化推荐方法首先自动检测出软件系统数据库模式发生的变更,随后采用程序切片技术得出与数据库操作相关的程序切片;确定受到数据库模式变更影响的程序切片后,利用源程序转换流程图算法将程序切片转化为程序流程图;根据程序流程图的分支条件得出SQL语句所有可能的特定执行路径;最后采用图映射的方法对每条路径的SQL语句进行变更语句推荐,推荐出新数据库模式下可执行的SQL语句。为了验证该方法的可行性,实现了一个用于自动检测数据库模式变更并能推荐出SQL语句演化后代码的插件工具。

关 键 词:数据库模式  演化  SQL语句  程序切片  程序流程图
收稿时间:2015/1/20 0:00:00
修稿时间:5/3/2015 12:00:00 AM

Method of Code Evolution Recommendation for Database Schema Change
ZHANG Wu-neng,LI Hong-wei,SHEN Li-wei and ZHAO Wen-yun.Method of Code Evolution Recommendation for Database Schema Change[J].Computer Science,2016,43(2):216-223.
Authors:ZHANG Wu-neng  LI Hong-wei  SHEN Li-wei and ZHAO Wen-yun
Affiliation:School of Computer Science,Fudan University,Shanghai 201203,China;Shanghai Key Laboratory of Data Science,Fudan University,Shanghai 201203,China,School of Computer Science,Fudan University,Shanghai 201203,China;Shanghai Key Laboratory of Data Science,Fudan University,Shanghai 201203,China;School of Computer Information and Engineering,Jiangxi Normal University,Nanchang 330022,China,School of Computer Science,Fudan University,Shanghai 201203,China;Shanghai Key Laboratory of Data Science,Fudan University,Shanghai 201203,China and School of Computer Science,Fudan University,Shanghai 201203,China;Shanghai Key Laboratory of Data Science,Fudan University,Shanghai 201203,China
Abstract:Many software store information relies on database,while the database schema change will lead to some source code SQL statements associated with the database cannot be performed properly.Thus finding a way to locate the SQL statement code which needs modifying and to recommend possible changes to these programs is necessary.We proposed a code evolution recommendation method for database schema changes.Firstly,the method detects software system database schema change,and uses the program slicing technique to get source code fragments related to the ope-ration of the database.Then it determines the program slicing impacted by the database schema change,and uses algorithm for generating flowchart from source program to get program flowcharts.SQL statements may have some distinct execution paths according to program flow branches condition.Finally,it uses figure mapping method for each SQL statement to recommend executable SQL statements under the new database schema.In order to verify the feasibility of the method,the article implemented a plug-in tool used to detect the database schema changes,and to recommend executable SQL statement under new database schema.
Keywords:Database schema  Evolution  SQL statements  Program slicing  Program flow chart
点击此处可从《计算机科学》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号