System, method and computer program product for automatic code generation for database object deletion
First Claim
1. A computer program product, comprising a non-transitory computer usable medium having a computer readable program code embodied therein, the computer readable program code causing a computer to implement a method for automatic code generation for object deletion, the method comprising:
- identifying by a database system an object within a database of the database system, where the object has a foreign key relationship with at least one other object within the database;
receiving at the database system metadata specific to the database, the metadata including;
a delete method by which the object is deleted within the database, anda delete constraint uniquely configured for the foreign key relationship of the object, the delete constraint limiting deletion of the object within the database; and
automatically generating code by the database system for deleting the object in response to a user request to delete the object within the database, using the received delete method and the delete constraint included in the metadata, by;
inputting by the database system the metadata including the delete method and the delete constraint into a code generator in response to the user request to delete the object within the database,determining whether the delete constraint allows deletion of the object of the database, andupon determining that the delete constraint allows deletion of the object of the database having the foreign key relationship, automatically generating code to delete the object using the delete method in response to the input, utilizing the code generator.
1 Assignment
0 Petitions
Accused Products
Abstract
In accordance with embodiments, there are provided mechanisms and methods for automatic code generation for database object deletion. These mechanisms and methods for automatic code generation for database object deletion can generate code for deleting database objects in an automated manner. The ability to generate code for deleting database objects in an automated manner can enable the efficient and accurate deletion of database objects, including database objects with relationships to other database objects.
156 Citations
18 Claims
-
1. A computer program product, comprising a non-transitory computer usable medium having a computer readable program code embodied therein, the computer readable program code causing a computer to implement a method for automatic code generation for object deletion, the method comprising:
-
identifying by a database system an object within a database of the database system, where the object has a foreign key relationship with at least one other object within the database; receiving at the database system metadata specific to the database, the metadata including; a delete method by which the object is deleted within the database, and a delete constraint uniquely configured for the foreign key relationship of the object, the delete constraint limiting deletion of the object within the database; and automatically generating code by the database system for deleting the object in response to a user request to delete the object within the database, using the received delete method and the delete constraint included in the metadata, by; inputting by the database system the metadata including the delete method and the delete constraint into a code generator in response to the user request to delete the object within the database, determining whether the delete constraint allows deletion of the object of the database, and upon determining that the delete constraint allows deletion of the object of the database having the foreign key relationship, automatically generating code to delete the object using the delete method in response to the input, utilizing the code generator. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 17, 18)
-
-
13. A method, comprising:
-
identifying by a database system an object within a database of the database system, where the object has a foreign key relationship with at least one other object within the database; receiving at the database system metadata specific to the database, the metadata including; a delete method by which the object is deleted within the database, and a delete constraint uniquely configured for the foreign key relationship of the object, the delete constraint limiting deletion of the object within the database; and automatically generating code by the database system for deleting the object in response to a user request to delete the object within the database, using the received delete method and the delete constraint included in the metadata, by; inputting by the database system the metadata including the delete method and the delete constraint into a code generator in response to the user request to delete the object within the database, determining whether the delete constraint allows deletion of the object of the database, and upon determining that the delete constraint allows deletion of the object of the database having the foreign key relationship, automatically generating code to delete the object using the delete method in response to the input, utilizing the code generator.
-
-
14. An apparatus, comprising:
-
a processor for; identifying by a database system an object within a database of the database system, where the object has a foreign key relationship with at least one other object within the database; receiving at the database system metadata specific to the database, the metadata including; a delete method by which the object is deleted within the database, and a delete constraint uniquely configured for the foreign key relationship of the object, the delete constraint limiting deletion of the object within the database; and automatically generating code by the database system for deleting the object in response to a user request to delete the object within the database, using the received delete method and the delete constraint included in the metadata, by; inputting by the database system the metadata including the delete method and the delete constraint into a code generator in response to the user request to delete the object within the database, determining whether the delete constraint allows deletion of the object of the database, and upon determining that the delete constraint allows deletion of the object of the database having the foreign key relationship, automatically generating code to delete the object using the delete method in response to the input, utilizing the code generator.
-
Specification