PL/SQL Transactions   «Prev 

Data Integrity Telephone Billing Example

Process Thousands of Records

1) In this imaginary telephone billing system, thousands of records are processed at the end of each billing cycle.
The records are collected from many diverse sources and brought to the central billing system. Let us say that there is an invalid record in the middle of Jody Smith's records.

2) The central billing system sorts all the information by customer and feeds it all into a PL/SQL procedure

3) The procedure processes each record, adding the record to a history table and then updating the summary record for the summer's monthly billing statement

4) The invalid record causes the procedure to stop, leaving all the previous customer's records plus some portion of Jody Smith's records in the database. At this point data integrity has been compromised.