Web Applications   «Prev  Next»

Alternative Locking Methods- Exercise

Alternative locking methods for Web applications

Objective: Use two methods to minimize locking for Web applications.


You will receive 10 points for this exercise. The exercise is auto-scored; when you have completed the exercise, click the Submit button to receive full credit.


The objective of this exercise is to demonstrate the application of two methods to minimize locking for Web applications.
Specifications are as follows: Your database retrieves rows from a table called student. This table has four columns


Your Web screen can only update the student_address column of the table.
You do not want to hold Oracle locks with the FOR UPDATE clause, so you will write your application to retrieve a rows from this table without holding locks. Upon retrieval, you store the prior data values in the following columns:
:old_student telephone


Based on the specifications described above and what you know about alternative locking methods for Web applications, create and submit an SQL statement that tests the prior values before issuing the update.


Remember that Oracle will return a non-zero error status if a row is not found. You must re-retrieve the row and compare the old values to the new values before issuing the update.