Automated Insertion of Exception Handling for Key and Referential Constraints

K. Liu, Hee Beng Kuan Tan, Xu Chen
{"title":"Automated Insertion of Exception Handling for Key and Referential Constraints","authors":"K. Liu, Hee Beng Kuan Tan, Xu Chen","doi":"10.4018/jdm.2013010101","DOIUrl":null,"url":null,"abstract":"Key and referential constraints are the two main integrity constraints in database applications. These constraints can be enforced by the Database Management System automatically. Any violation from these constraints is handled by programmer's written code. This paper proposes an approach to relieve the burden of programmers from the mechanical coding for the exception handling of these constraints. In our approach, first SQL operations that may lead to constraint violations are identified. Then, based on SQL query patterns, the code for exception handling is generated accordingly and inserted into the program automatically. We provide two alternative ways to handle the exceptions: one is handling the exceptions without using the automated enforcement in Database Management System, the other is to handle it in conjunction with the DBMS enforcement. We have developed a tool, GEHPHP (Generation of Exception Handling for PHP Systems), and conducted experiments to verify the proposed approach.","PeriodicalId":364411,"journal":{"name":"2012 19th Asia-Pacific Software Engineering Conference","volume":"15 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2012-12-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"7","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2012 19th Asia-Pacific Software Engineering Conference","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4018/jdm.2013010101","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 7

Abstract

Key and referential constraints are the two main integrity constraints in database applications. These constraints can be enforced by the Database Management System automatically. Any violation from these constraints is handled by programmer's written code. This paper proposes an approach to relieve the burden of programmers from the mechanical coding for the exception handling of these constraints. In our approach, first SQL operations that may lead to constraint violations are identified. Then, based on SQL query patterns, the code for exception handling is generated accordingly and inserted into the program automatically. We provide two alternative ways to handle the exceptions: one is handling the exceptions without using the automated enforcement in Database Management System, the other is to handle it in conjunction with the DBMS enforcement. We have developed a tool, GEHPHP (Generation of Exception Handling for PHP Systems), and conducted experiments to verify the proposed approach.
为键和引用约束自动插入异常处理
键约束和引用约束是数据库应用程序中的两种主要完整性约束。这些约束可以由数据库管理系统自动执行。任何违反这些约束的情况都由程序员编写的代码处理。本文提出了一种方法来减轻程序员对这些约束的异常处理的机械编码负担。在我们的方法中,首先识别可能导致违反约束的SQL操作。然后,根据SQL查询模式,相应地生成异常处理代码并自动插入到程序中。我们提供了两种处理异常的替代方法:一种是在不使用数据库管理系统中的自动强制的情况下处理异常,另一种是与DBMS强制一起处理异常。我们开发了一个工具,GEHPHP (PHP系统异常处理的生成),并进行了实验来验证所提出的方法。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信