I understand a little about Oracle blocking - how updates block other updates till the transaction completes, how writers don't block readers etc.
I understand the concept of pessimistic and optimisic locking, and the typical banking textbook examples about losing lost updates etc.
I also understand the JDBC transaction isolation levels where we might say, for instance, we are happy with seeing uncommitted data.
I'm a bit fuzzy however about how these concepts are related and interact. For instance:
- Is Oracle providing pessimistic or optimistic locking by default (it just seems to block the seperate update based on experiments in two TOAD sessions.)
- If, as I suspect, these are application level concepts, why would I go to the trouble of implementing a locking strategy when I can let the database synchronise transaction updates anyway?
- How do transaction isolation levels (which I set on the connection) alter the database behaviour when other clients besides my application be accessing with different isolation levels.
Any words to clarify these topics would be really appreciated!