Automated insertion of exception handling for key and referential constraints

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 re...

Full description

Saved in:
Bibliographic Details
Main Authors: Liu, Kaiping, Tan, Hee Beng Kuan
Other Authors: School of Electrical and Electronic Engineering
Format: Conference or Workshop Item
Language:English
Published: 2013
Subjects:
Online Access:https://hdl.handle.net/10356/96575
http://hdl.handle.net/10220/12988
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Nanyang Technological University
Language: English
Description
Summary: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.