Planning the Method Hierarchy
Oracle Database Tips by Donald Burleson
While the coupling of data with
behaviors is a revolutionary concept for database management, the
failure to properly plan the implementation can be a disaster. In order
to achieve the benefits of using methods, a careful decomposition of the
processes must take place. As we discussed, there are three types of
processes, those that are independent of the database classes, and those
that are attached to a base-level database class and those that are
attached to aggregate database classes. In addition, any method may
have other methods nested within its structure, while at the same time
participating as a sub-method within another method (Figure 8.1)
Figure 8.1 - The recursive many-to-many nature
of method nesting.
Here we see that the check_credit() method is
composed of the sub-processes, check_payment_history() and
check_credit_references() methods. At the same time, check_credit()
participates in the place_order() and the hire_employee() methods. Given this
huge array of choices, where do we begin developing the methods? There is a
sequence of events that must take place to achieve this mapping of methods to
1. Before the mapping of methods to classes can
begin, you should have already created the following analysis and design
A set of fully decomposed data flow diagrams for your
system - This will be used as the specification for all of the methods. From
the DFD we will gather the method names, the input and output values, and the
breakdown of nested methods.
A entity/relationship diagram for the system - This
diagram will be used to identify the base classes for the system.
An aggregate object diagram - This diagram is used to
associate the higher level processes with the methods that will be attached to
2. From the DFD, create a prototype for every
process on the data flow diagram. This will formally state the input and output
parameters for each process on all levels of the DFD.
3. Identify and prototype all standalone
functions in the system.
4. Map the prototypes to the entities.
While this mapping of processes to methods may
seem to be a straightforward approach, there are many new concepts that a
traditional analyst my not be familiar with using. For the purpose of
illustration, we will use the running example from our order processing system
that was discussed in earlier chapters and use as our mapping example the
sub-processes that are contained within the fill_order process.