Database Reference
In-Depth Information
contains two end statements: one for successful endings, and the other for unhandled ex-
ception results. If exception handling is not available, then all the exception links of these
nodes will be linked to the unhandled exception end node. If exception handling is avail-
able then a primary handler switch node to which all the exception links of the compound
statement nodes are linked models the exception handler. A predicate node that checks for
the type of the exception models each specifi c exception handler. The exception predicate
has two links: the fi rst one to the start node of the exception handler block and the second
to the next handled exception. The primary handler switch is mainly the predicate node of
the fi rst exception handler. If the handler is the last in the block then the second link is made
to the unhandled exception end node of the compound statement. Statements inside the
handler block of each exception handler are modeled like other statements in the compound
block. However, the exception link is directly linked to the unhandled exception end node
of the compound statement. The end nodes of the exception handlers' blocks are linked to
the successful end node. Figure 1 further explains modeling of control fl ow transfers of a
compound statement.
The inner block is treated by the outer block like a single node with two outcomes
expected. The nodes that have been linked to the success end should be linked to the node
of the next statement in the outer block. Similarly, nodes that have been linked to the
unhandled exception end node should now be linked to the primary handler switch of the
outer block.
DATA FLOW MODELING
Background
Data fl ow testing methods focus on the occurrences of variables within the program.
Each variable occurrence is classifi ed as either defi nition occurrence or use occurrence. A
defi nition occurrence of a variable is where a value is bound to the variable. A use occur-
rence to a variable is where the value of the variable is referenced. Each use occurrence
is classifi ed as being a computational use or predicate use. If the value of the variable is
used to decide whether a predicate is true for selecting execution paths, the occurrence is a
predicate use. Otherwise, it is used to compute a value for defi ning other variables or as an
output value (Rapps & Weyuker, 1985).
The database plays an important role in holding the state of computation in database
modules. Other statements in the same module or other modules use the data generated by a
statement; thus creating data fl ow relations. The main source of data in a relational database
is tables. The data in these tables are created, deleted, updated, or retrieved. The manipulation
of this data is done through the use of SQL statements. Each table is composed of a fi xed
number of named fi elds or columns. A table consists of a set of records; each record has its
own values in each column. The SQL data manipulation language handles in one statement
a particular column value in a given row, some columns of a given row, or all the column
values of a row. It can also handle, in one statement, a given column, a group of column
values, or all the column values of a group of rows. It can also handle all the columns of
all the rows in the table.
Traditionally, data fl ow dependencies are created through the manipulation of variables
in which each variable is defi ned with a value that could be used later or rewritten. However,
Search WWH ::




Custom Search