Why should I consider optimistic versus pessimistic approaches to database updates?
Location: http://www.jguru.com/faq/view.jsp?EID=479243 Created: Aug 18, 2001 Author: Joe Sam Shirah (http://www.jguru.com/guru/viewbio.jsp?EID=42100) In a modern database, possibly the two most important issues are data integrity and concurrency ( multiple users have access to and can update the data ). Either approach can be appropriate, depending on the application, but it is important to be aware of possible consequences to avoid being blindsided. A pessimistic approach, with locks, is usually seen as good for data integrity, although it can be bad for concurrency, especially the longer a lock is held. In particular, it guarantees against ‘lost updates’ – defined as an update performed by one process between the time of access and update by another process, which overwrites the interim update. However, other users are blocked from updating the data and possibly reading it as well if the read access also tries to acquire a lock. A notorious problem can arise when a user accesses data
Related Questions
- As updates are made to the Bank’s database and account information is updated, data is then sent from the Bank to the secure PC Banking server and made available for you to view. Online Account Access Q: How do I access my account for the first time?
- Why should I consider optimistic versus pessimistic approaches to database updates?
- Whats the advantages of a database versus my paper system or an Excel spreadsheet?