HW#4 --- last modified March 02 2019 17:05:14..
Note the homework
has been extended till Tuesday, Nov. 18. If you turn it in by the original due date
(and not again on Tuesday) you are entitled to one bonus point.
Solution set.
Due date: Nov 17
Files to be submitted:
Hw4problems.pdf
Hw4Transactions.java
Purpose: To be able to estimate the cost of various
relational operations. To learn about transaction processing, concurrency, and
transaction isolation levels.
Specification:
Do the following problems out R & G 14.4, 16.3, 16.5, 16.6, 17.2.
Submit them in the file Hw4problems.pdf. For problem 16.6, I want
you to also submit spools (also in the .pdf file) of
SQLPLUS sessions where you show in oracle the given phenomena
occurring at the isolation level for part (1) (except dirty read).
Note if a phenomena cannot occur at that level you do not need to show
any SQLPLUS session for it.
For part(2), I want you to write JDBC methods for the examples
you give at each isolation level. Call these methods
public void readUncommitted(); /*
Note you do not have to set the isolation for your code
here but if Oracle did permit reading uncommitted
transactions. Your transaction should still be happy.
*/
public void readCommitted();
public void repeatableRead();/*
Note you do not have to set the isolation for your code
here but if Oracle did have a repeatable read level
your transaction should still be happy. (Note you might be
able to fake this level by reading up on Oracle locking.)
*/
public void serializable();
Put all these transactions in the class Hw4Transactions.java and write
a main that runs each in turn. In addition, main creates any table with
rows needed to run your transactions. Make it clear what things the
grader would need to change to run on her system. Make sure you comment
your code so the grader knows what your transactions do.
Point Breakdown
Problem 14.4 (.2 each part) |
1.4pts
|
16.3 (.4 each part) |
1.6pts
|
16.5 | 2pts
|
16.6 (text part 1.5) (Oracle part (i) 1pt; part(ii) 1.5pts) | 4pts
|
17.2 | 1pts
|
Total | 10pts |
|