Posts

Showing posts from March 15, 2010

Lost Updates

Lost updates happen in multi user environment quite normally if the application is not well built. It happens when you have multiple users and some of them are trying to update same data around same time. User’s action from query to update: - Data is retrieved to user's memory, make the necessary changes and puts the data back to the database. Data is read from the database to the users’ machine around the same time, session one makes required changes and saves, by this time the other session also does some changes and saves. If there is no checking the second session will overwrite the first session's changes. Let’s take an application to explain This is an application which will be used by users for booking for programmes. The current situation is that only one seat is available but two users are querying the system for booking at the same time. User_1 queries the system and gets the status of booking “open” only for one person User_2 queries the system and ge