面向数据库模式变更的代码演化推荐方法  被引量:2

Method of Code Evolution Recommendation for Database Schema Change

在线阅读下载全文

作  者:张武能[1,2] 李宏伟[1,2,3] 沈立炜[1,2] 赵文耘[1,2] 

机构地区:[1]复旦大学计算机科学技术学院,上海201203 [2]上海市数据科学重点实验室(复旦大学),上海201203 [3]江西师范大学计算机信息工程学院,南昌330022

出  处:《计算机科学》2016年第2期216-223,共8页Computer Science

基  金:国家"863"高技术研究发展计划项目(2013AA01A605);国家自然科学基金项目(61402113)资助

摘  要:许多软件依赖数据库来存储信息。数据库模式的变更可能导致程序代码中与数据库相关的SQL语句代码不能正常执行,因而找出一种能够直接定位到需要修改的SQL语句代码并推荐出这些代码可能的修改方案的方法是十分必要的。提出的面向数据库模式变更的代码演化推荐方法首先自动检测出软件系统数据库模式发生的变更,随后采用程序切片技术得出与数据库操作相关的程序切片;确定受到数据库模式变更影响的程序切片后,利用源程序转换流程图算法将程序切片转化为程序流程图;根据程序流程图的分支条件得出SQL语句所有可能的特定执行路径;最后采用图映射的方法对每条路径的SQL语句进行变更语句推荐,推荐出新数据库模式下可执行的SQL语句。为了验证该方法的可行性,实现了一个用于自动检测数据库模式变更并能推荐出SQL语句演化后代码的插件工具。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 operation 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.

关 键 词:数据库模式 演化 SQL语句 程序切片 程序流程图 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象