Database Reference
In-Depth Information
accounts and ensures that issued checks are not reported stolen. Modules Pay_Check , Sto-
len_Check , and Update_Balance are used to implement this functionality.
The tables used in this example are:
ACCOUNTS (acc_number, acc_name, balance, status): holds the accounts' informa-
tion.
TRANSACTIONS (trans_num, account, doc_num, amount, t_entry_date, value_date):
used to keep track of paid checks.
STOLEN_CHECKS (check_num, s_entry_date): used to register the numbers of the
checks reported stolen.
Pay_Check
in PL/SQL Oracle's implementation of SQL-PSM. The circles denote nodes in the control
fl ow, and arrows denote possible control transfer. This control fl ow analysis is statement
based, where a node represents each statement.
In this control fl ow analysis, the inter-module extensions are not presented, although in
this module there are implicit and explicit calls to other modules. Statement 1 calls function
Stolen_Check , and statement 3 triggers the fi ring of Update_Balance trigger, which is set
on the TRANSACTIONS table. The component usages are not shown as well. Statement 3
explicitly uses table TRANSACTIONS and columns trans_num, account, doc_num, amount,
and t_entry_date. Statement 3 implicitly uses column value_date that is not present in the
insert list. It implicitly uses table ACCOUNTS by reference since column account is part
of a foreign key referencing table ACCOUNTS. This usage implies that table ACCOUNT
is checked to see whether the account record being used exists.
Figures 4 and 5 list trigger Update_Balance and function Stolen_Check respectively
Figure 3 depicts module Pay_Check and its control fl ow graph. The code is written
and the control fl ow graph of each module.
Figure 3: Function Pay_Check and its corresponding control fl ow graph
 
Search WWH ::




Custom Search