Claims
- 1. A method of automatically generating a complete dependency graph of a database code object, using a computer which has a processor, memory, display, input/output devices and connectivity software to connect to a database server, the method comprising the steps of:
applying a recursive algorithm that queries a database for dependency information and outputs a direct dependency graph of a database code object, the “direct dependency graph” containing dependencies representing dependencies that do not involve dependencies on triggers and on implementations of object-oriented code objects in the database; applying the recursive algorithm on each of the object-oriented code objects in the dependency graph to incorporate dependencies of implementations of code objects in the database; using a parser on each of the code objects in the dependency graph to identify DML statements that “fires” triggers thereby identifying dependencies on triggers; applying the recursive algorithm on each of the triggers to incorporate the dependencies of the triggers into the dependency graph; and repeating the procedure for incorporating dependencies of implementation of object oriented code objects as well as the dependencies on triggers and its dependencies until new dependencies are not added to the dependency graph.
- 2. The method of claim 1 comprizing the additional step of using the generated dependency graph to compile code objects in debug mode as part of a database code object debugging tool.
- 3. The method of claim 1 comprizing the additional step of using the generated dependency graph to identify calling paths in a database code coverage tool.
- 4. The method of claim 1 comprizing the additional step of using the generated dependency graph to identify calling paths in a database code object profiling tool.
- 5. The method of claim 1 comprizing the additional step of using the generated dependency graph in a database code object testing tool.
- 6. The method of claim 1 comprizing the additional step of using the generated dependency graph to identify dependent objects that are INVALID in the database.
- 7. The method of claim 1 comprizing the additional step of using the generated dependency graph to identify cyclic dependencies among database code objects.
- 8. The method of claim 1 comprizing the additional step of using the generated dependency graph in a dependency graph presentation tool.
- 9. A method of generating a basic dependency tree of a code object that does not take into consideration dependencies on triggers and on implementations of object-oriented code objects, the method comprising the steps of:
querying a database catalog for direct dependencies of a code object and then for each dependency found, doing the query recursively until all basic dependencies are generated into a dependency tree.
- 10. The method of claim 9 comprizing the additional step of using the generated dependency tree to compile code objects in debug mode as part of a database code object debugging tool.
- 11. The method of claim 9 comprizing the additional step of using the generated dependency tree to identify calling paths in a database code coverage tool.
- 12. The method of claim 9 comprizing the additional step of using the generated dependency tree to identify calling paths in a database code object profiling tool.
- 13. The method of claim 9 comprizing the additional step of using the generated dependency tree in a database code object testing tool.
- 14. The method of claim 9 comprizing the additional step of using the generated dependency tree to identify dependent objects that are INVALID in the database.
- 15. The method of claim 9 comprizing the additional step of using the generated dependency tree to identify cyclic dependencies among database code objects.
- 16. The method of claim 9 comprizing the additional step of using the generated dependency tree in a dependency graph presentation tool.
- 17. A method of generating dependency information including dependencies of code objects on database triggers, the method comprising the steps of:
1) using a recursive algorithm for querying a database catalog for direct dependencies of a code object and then for each dependency found, doing the query recursively until all basic dependencies are generated into a dependency graph; 2) using a parser on each of the code objects in the dependency graph to identify DML statements that “fires” triggers thereby identifying dependencies on triggers; 3) applying the recursive algorithm on each of the triggers to incorporate the dependencies of the triggers into the dependency graph; and 4) repeating steps 1-3 for incorporating dependencies on triggers and their dependencies until new dependencies are not added to the dependency graph.
- 18. The method of claim 17 comprizing the additional step of using the generated dependency information to identify calling paths in a database code coverage tool.
- 19. The method of claim 17 comprizing the additional step of using the generated dependency information to identify calling paths in a database code object profiling tool.
- 20. The method of claim 17 comprizing the additional step of using the generated dependency information in a database code object testing tool.
- 21. The method of claim 17 comprizing the additional step of using the generated dependency information to identify dependent objects that are INVALID in the database.
- 22. A method of generating dependencies of code objects as well as implementations of object oriented code objects in a database, the method comprising the steps of:
1) applying a recursive algorithm that queries a database for dependency information and outputs a direct dependency graph of a database code object, the “direct dependency graph” containing dependencies that do not involve dependencies on triggers and on implementations of object-oriented code objects in the database; 2) applying the recursive algorithm on each of the object-oriented code objects in the dependency graph to incorporate dependencies of implementations of code objects in the database; and 3) repeating steps 1 and 2 for incorporating dependencies of implementation of object oriented code objects until new dependencies are not added to the dependency graph.
- 23. The method of claim 22 comprizing the additional step of using the generated dependency information in the direct dependency graph to identify calling paths in a database code coverage tool.
- 24. The method of claim 22 comprizing the additional step of using the generated dependency information in the direct dependency graph to identify calling paths in a database code object profiling tool.
- 25. The method of claim 22 comprizing the additional step of using the generated dependency information in the direct dependency graph in a database code object testing tool.
- 26. The method of claim 22 comprizing the additional step of using the generated dependency information in the direct dependency graph to identify dependent objects that are INVALID in the database.
- 27. A system for identifying dependencies, if any, of a target data base code object, the system comprizing:
a digital computer; a database server coupled to the computer; a data base coupled to the database server having data stored therein, the data comprising object-oriented code objects, specifications of packages, implementations of packages, specifications of types, implementations of types and triggers; and a code mechanism for generating a dependency graph, the dependency graph being a data structure and having entries to contain representations of depending code objects, specifications of packages, implementations of packages, specifications of types, implementations of types, triggers and dependencies of triggers which are relevant to the target data base code object.
- 28. A method for generating dependencies of a target data base code object, using a computer having a processor, memory, display, input/output devices, the method comprising the steps of:
providing a data base coupled to the computer having data stored therein, the data comprizing representations of object-oriented code objects, specifications of packages, implementations of packages, specifications of types, implementations of types and triggers; and using a recursive code mechanism for generating a dependency graph, the dependency graph being a data structure and having entries to contain representations of dependent code objects, specifications of packages, implementations of packages, specifications of types, implementations of types, triggers and dependencies of triggers which are relevant to the target data base code object.
- 29. A computer program product embedded on a computer readable medium for use in debugging a target data base code object comprizing:
a recursive code mechanism for generating a dependency graph of the target data base code object, the dependency graph being a data structure and having entries to contain representations of depending code objects, specifications of packages, implementations of packages, triggers and dependencies of triggers which are relevant to the target data base code object; and a program code mechanism for using the dependency graph to debug the target data base code object.
- 30. A computer program product embedded on a computer readable medium for use in debugging a target data base code object comprizing:
a first program code mechanism for applying a recursive algorithm that queries a database for dependency information and outputs a direct dependency graph of a database code object, the “direct dependency graph” containing dependencies representing dependencies that do not involve dependencies on triggers and on implementations of object-oriented code objects in the database; a second program code mechanism for applying the recursive algorithm on each of the object-oriented code objects in the direct dependency graph to incorporate dependencies of implementations of code objects in the database; a third program code mechanism for parsing the source code of the code object to identify DML statements that “fires” triggers, thereby identifying the dependencies on triggers; a fourth program code mechanism for applying the recursive algorithm on each of the triggers to incorporate the dependencies of the triggers into the direct dependency graph; a fifth program code mechanism for repeating the procedure for incorporating dependencies of implementation of object oriented code objects as well as the dependencies on triggers until new dependencies are not added to the dependency graph; and a sixth program code mechanism for using the dependency graph to debug the target data base code object.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application is related to application Ser. No. ______ entitled “METHOD AND APPARATUS FOR EXECUTING STORED CODE OBJECTS IN A DATABASE,” filed Dec. 22, 1998.