Automated Insertion of Exception Handling for Key and Referential Constraints

  • Authors:
  • Kaiping Liu;Hee Beng Kuan Tan

  • Affiliations:
  • -;-

  • Venue:
  • APSEC '12 Proceedings of the 2012 19th Asia-Pacific Software Engineering Conference - Volume 01
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

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.