Chapter 5. Deploying pre-configured databases 249
AND r.routinetype = 'F'
AND d.btype = 'T'
AND d.bschema = 'ITSO'
AND d.bname = 'EMPLOYEE'
// Stored procedures dependencies
SELECT
r.routinename
FROM
syscat.routines r,
syscat.routinedep rd,
syscat.packagedep pd
WHERE
r.specificname = rd.routinename
AND rd.bschema = pd.pkgschema
AND rd.bname = pd.pkgname
AND r.routinetype = 'P'
AND rd.btype = 'K'
AND pd.btype = 'T'
AND pd.bschema = 'ITSO'
AND pd.bname = 'EMPLOYEE';
Our sample application only covers checking constraints and triggers. The focus
of the application is to show how an implementation can be made, and uses
changes to the table layout as a starting point. We do not build the dependently
map in the sample application.
The big picture of the application
The application is intended for use at the target system, with no access to the
source system, which is a common scenario. The new database configuration is
therefore packaged with the application. In the case of our sample application the
new database configuration is hardcoded. Information about the target database
are given as parameters to the application.
Figure 5-5 shows an overview of the application. The numbered circles represent
actions. The squares with bold text are Java classes that implements logic.
Those with the underlined text represent Java classes containing data.