Computation of impacted and affected code due to database schema changes
Saved in:
| Title: | Computation of impacted and affected code due to database schema changes |
|---|---|
| Patent Number: | 8,782,001 |
| Publication Date: | July 15, 2014 |
| Appl. No: | 12/958893 |
| Application Filed: | December 02, 2010 |
| Abstract: | The disclosed technology enables assistance to software developers by identifying the software application code that needs to be changed or behaves differently, as a consequence of a database schema change. The disclosed technology also enables a provision of automatic transformations, or at least hints for the transformation of the code, to accommodate the database schema change. |
| Inventors: | Burke, Michael G. (Yorktown Heights, NY, US); Gallardo Valencia, Rosalva E. (Irvine, CA, US); Peshansky, Igor (Yorktown Heights, NY, US) |
| Assignees: | International Business Machines Corporation (Armonk, NY, US) |
| Claim: | 1. A computer-implemented method for assessing an impact of a database schema change on a software application that accesses a database, the method comprising: receiving, at a processing unit associated with a computer, representation of a proposed database schema change; analyzing code of the software application responsive to said received representation, to identify a portion of the code which accesses a database object identified as being subject of the proposed database schema change; determining a first data set by processing the identified portion of the code using database object slicing for the database object affected by the proposed database schema change; determining a second data set by processing the first data set using a list which includes at least one API property of the code of the software application; applying a set of predetermined rules against the second data set in order to obtain a third data set comprising one or more statements or expressions of affected code portions that produce a different result due to database schema change, impacted code portions to be transformed in order to synchronize it with the proposed database schema change, or invalidated code portions including impacted code that unless modified will produce a runtime error, each code portion having an associated reference; and sending the third data set to an analysis result recipient capable of allowing a user to access, via the reference, at least a portion of the third data set; computing software application code affected by the proposed database schema change by applying a predetermined affected code rule against the second data set in order to obtain a fourth data set comprising the affected software application code; sending the fourth data set to the analysis result recipient operably coupled to an IDE; and recording, by the analysis recipient, of the third data set and the fourth data set in a format accessible by a program transformer. |
| Claim: | 2. The method of claim 1 , wherein the proposed database change is in the form of a query language statement, the software application is written in an object-oriented computer programming language and the database object is one of the following: a database schema, a table, a table space, a view, a column, a constraint, a privilege, a primary key, a foreign key, a procedure. |
| Claim: | 3. The method of claim 1 , further comprising: computing a suggested software application code modification by applying a predetermined impacted code rule against the second data set in order to obtain a fourth data set comprising the suggested software application code modification; sending the fourth data set to the analysis result recipient operably coupled to an IDE; and recording, by the analysis recipient, of the third data set and the fourth data set in a format accessible by a program transformer. |
| Claim: | 4. The method of claim 1 , wherein the code of the software application is obtained from a file on a disk, a network, a data repository, a specified workspace, a project, a software module, a database web service or an IDE operably connected to a database server operably connected to the database including a database schema and data. |
| Claim: | 5. The method of claim 1 , wherein the code is source code and the source code of the software application is obtained from decompiling a pre-existing software application, a text file on a disk, a network, a data repository, a specified workspace, a project, a software module, a database web service or an IDE operably connected to a database server including a database schema and data. |
| Claim: | 6. The method of claim 1 , wherein performance of the method is activated via a GUI of the analysis result recipient and a DDL statement is input into the GUI and a monitoring program operably coupled to the GUI checks whether a content of the DDL statement is one which should prompt an activation of the method. |
| Claim: | 7. The method of claim 6 , wherein, after a save operation in an editing session, the monitoring program operably coupled to a DDL editor is capable of checking whether an edit made during the editing session includes content that prompts the activation of the method in an IDE, wherein the IDE supports an edit mode, wherein a user can read and modify the affected code and a read-only mode, wherein a user can read, but not modify the affected code, and the IDE is the analysis result recipient. |
| Claim: | 8. The method of claim 7 , wherein the checking is triggered by a user via a menu of the DDL editor operably coupled to the IDE and wherein the analysis result recipient, once the IDE user selects the reference using an input device, displays the associated portion of the third data set in a new GUI window. |
| Claim: | 9. The method of claim 1 , wherein the analysis result recipient is capable of displaying the third data set formatted to be visually distinct from other code of the software application and other code portions of the third data set. |
| Claim: | 10. The method of claim 1 , wherein the analysis result recipient is capable of displaying the third data set in a hierarchical dynamic expandable tree order wherein the tree includes a node representing a code file accessible via the reference and wherein the node displays a name of the code file. |
| Claim: | 11. A computer program product for assessing an impact of a database schema change on a software application, the computer program product comprising: a storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing a method comprising: receiving, at a processing unit associated with a computer, representation of a proposed database schema change; analyzing code of the software application responsive to said received representation to identify a portion of the code which accesses a database object identified as being subject of a proposed database schema change; determining a first data set by processing the identified portion of the code using database object slicing for the database object affected by the proposed database schema change; determining a second data set by processing the first data set using a list which includes at least one API property of the code of the software application; applying a set of predetermined rules against the second data set in order to obtain a third data set comprising one or more statements or expressions of affected code portions that produce a different results due to database schema change, impacted code portions that are be transformed in order to synchronize it with the proposed database schema change, or invalidated code portions including impacted code that unless modified will produce a runtime error, each code portion having a reference to be accessible by; and sending the third data set to an analysis result recipient capable of allowing a user to access, via the reference, at least a portion of the third data set; computing software application code affected by the proposed database schema change by applying a predetermined affected code rule against the second data set in order to obtain a fourth data set comprising the affected software application code; sending the fourth data set to the analysis result recipient operably coupled to an IDE; and recording, by the analysis recipient, of the third data set and the fourth data set in a format accessible by a program transformer. |
| Claim: | 12. The computer program product of claim 11 , wherein the proposed database change is in the form of a query language statement, the software application is written in an object-oriented computer programming language and the database object is one of the following: a database schema, a table, a table space, a view, a column, a constraint, a privilege, a primary key, a foreign key, a procedure. |
| Claim: | 13. The computer program product of claim 11 , further comprising: computing a suggested software application code modification by applying a predetermined impacted code rule against the second data set in order to obtain a fourth data set comprising the suggested software application code modification; sending the fourth data set to the analysis result recipient operably coupled to an IDE; and recording, by the analysis recipient, of the third data set and the fourth data set in a format accessible by a program transformer. |
| Claim: | 14. The computer program product of claim 11 , wherein the code of the software application is obtained from a file on a disk, a network, a data repository, a specified workspace, a project, a software module, a database web service or an IDE operably connected to a database server operably connected to the database including a database schema and data. |
| Claim: | 15. The computer program product of claim 11 , wherein performance of the method is activated via a GUI of the analysis result recipient and a DDL statement is input into the GUI and a monitoring program operably coupled to the GUI checks whether a content of the DDL statement is one which should prompt an activation of the method. |
| Claim: | 16. The computer program product of claim 15 , wherein, after a save operation in an editing session, the monitoring program operably coupled to a DDL editor capable of checking whether an edit made during the editing session includes content that prompts the activation of the method in an IDE, wherein the IDE supports an edit mode, wherein a user can read and modify the affected code and a read-only mode, wherein a user can read, but not modify the affected code, and the IDE is the analysis result recipient. |
| Claim: | 17. The computer program product of claim 16 , wherein the checking is triggered by a user via a menu of the DDL editor operably coupled to the IDE and wherein the analysis result recipient, once the IDE user selects the reference using an input device, displays the associated portion of the third data set in a new GUI window. |
| Claim: | 18. The computer program product of claim 11 , wherein the analysis result recipient is capable of displaying the third data set formatted to be visually distinct from other code of the software application and other code portions of the third data set. |
| Claim: | 19. The computer program product of claim 11 , wherein the analysis result recipient is capable of displaying the third data set in a hierarchical dynamic expandable tree order wherein the tree includes a node representing a code file accessible via the reference and wherein the node displays a name of the code file. |
| Claim: | 20. A computer system for assessing an impact of a database schema change on a software application, the system comprising: a memory; a processor in communications with the computer memory, wherein the computer system is capable of performing a method comprising: receiving, at a processing unit associated with a computer, representation of a proposed database schema change; analyzing code of the software application responsive to said received representation to identify a portion of the code which accesses a database object identified as being subject of a proposed database schema change; determining a first data set by processing the identified portion of the code using database object slicing for the database object affected by the proposed database schema change; determining a second data set by processing the first data set using a list which includes at least one API property of the code of the software application; applying a set of predetermined rules against the second data set in order to obtain a third data set comprising one or more statements or expressions of affected code portions that produce a different results due to database schema change, impacted code portions that are be transformed in order to synchronize it with the proposed database schema change, or invalidated code portions including impacted code that unless modified will produce a runtime error, each code portion having a reference to be accessible by; and sending the third data set to an analysis result recipient capable of allowing a user to access, via the reference, at least a portion of the third data set; computing a suggested software application code modification by applying a predetermined impacted code rule against the second data set in order to obtain a fourth data set comprising the suggested software application code modification; sending the fourth data set to the analysis result recipient operably coupled to an IDE; and recording, by the analysis recipient, of the third data set and the fourth data set in a format accessible by a program transformer and wherein the proposed database change is in the form of a query language statement, the software application is written in an object-oriented computer programming language and the database object is one of the following: a database schema, a table, a table space, a view, a column, a constraint, a privilege, a primary key, a foreign key, a procedure. |
| Claim: | 21. The computer system of claim 20 , wherein the code of the software application is obtained from a file on a disk, a network, a data repository, a specified workspace, a project, a software module, a database web service or an IDE operably connected to a database server operably connected to the database including a database schema and data. |
| Claim: | 22. The computer system of claim 20 , further comprising: computing software application code affected by the proposed database schema change by applying a predetermined affected code rule against the second data set in order to obtain a fourth data set comprising the affected software application code; sending the fourth data set to the analysis result recipient operably coupled to an IDE; and recording, by the analysis recipient, of the third data set and the fourth data set in a format accessible by a program transformer and wherein the analysis result recipient is capable of displaying the third data set formatted to be visually distinct from other code of the software application and other code portions of the third data set and wherein the analysis result recipient is capable of displaying the third data set in a hierarchical dynamic expandable tree order wherein the tree includes a node representing a code file accessible via the reference and wherein the node displays a name of the code file. |
| Current U.S. Class: | 707/610 |
| Patent References Cited: | 2002/0118954 August 2002 Barton et al. 2006/0143047 June 2006 Briegs et al. 2009/0307650 December 2009 Saraf et al. 2010/0114962 May 2010 Ahadian et al. 2010/0313179 December 2010 Groves et al. |
| Other References: | Fink et al., “Semi-Automatic J2EE Transaction Configuration”, RC23326 (W0403-130) Mar. 22, 2004 Computer Science, pp. 1-19. cited by applicant Maule et al., Impact Analysis of Database Schema Changes:, ICSE'08, May 10-18, 2008, Leipzig, Germany, pp. 1-10. cited by applicant Deruelle et al., “A Change impact Analysis Approach for Corba Based Federated Database”, [Online], 2000, pp. 949-958, [retrieved from Internet on Jun. 17, 2012], http://www.springerlink.com/content/f9kfrcmq04rvq24e/fulltext.pdf. cited by applicant Daou et al., “Regression Testing of Database Applications”, 2001, pp. 285-290, [retrieved from Internet on Jun. 17, 2012], http://web.cs.du.edu/˜sazghand/background—chap—papers/Regression%20testing%20database%20application.pdf. cited by applicant Karahasanovic et al., “Visualizing impacts of database schema changes—A controlled experiment”, Proceedings IEEE Symposia on Human-Centric Computing Languages and Environments (Cat. No. 01TH8587) pp. 358-365. Sep. 5-7, 2001, Stresa, Italy. cited by applicant Karahasanovic et al., “Identifying impacts of Database Schema Changes on applications” Proceedings of the 8th Doctorial Consortium at the Caise '01, Jun. 4, 2001, pp. 1-12, XP002369522 Switzerland. cited by applicant Lock, Simon et al., “Systematic change impact determination in complex object database schemata” ECOOP Workshop 1999: Proceedings of the workshop for PHD Students in OO Systems (PHDOOS'99), Jun. 14, 1999, pp. 1-10, XP002369519. cited by applicant IBM DB2 Change Management Expert for Multiplatforms, User's Guide, Version 1, Release 1. See pp. 16-18, http://publib.boulder.ibm.com/infocenter/mptoolic/v1r0/topic/com.ibm.db2tools.chx.doc.ug/chxuga12.pdf?noframes=tru |
| Assistant Examiner: | Black, Linh |
| Primary Examiner: | Trujillo, James |
| Attorney, Agent or Firm: | Scully, Scott, Murphy & Presser, P.C. Percello, Esq., Louis J. |
| Accession Number: | edspgr.08782001 |
| Database: | USPTO Patent Grants |
| Abstract: | The disclosed technology enables assistance to software developers by identifying the software application code that needs to be changed or behaves differently, as a consequence of a database schema change. The disclosed technology also enables a provision of automatic transformations, or at least hints for the transformation of the code, to accommodate the database schema change. |
|---|