• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Multiuser concurrency and Contention

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear sir,
I know this is a very famous problem and something must have been already discussed on it on this forum. The issue i am dealing with is a kind of a typical online shopping mall. Two kind of users (administrators and customers) try to read or/and update the database at the same time and result in inconsistent data.
Eg.
A(User) B(User)
1 Read Operation 10(Product qty) 10(Product qty)
Sees 10, makes 15 Sees 10, makes 20
2 Update 15
3 Commit 15
4 Update 20
5 Commit 20
As you see the changes made by user A have been lost.
Can anyone share his valuable experience in this regard or if possible give me a link to some related topic in this forum
Thanking in advance
K Anand
 
K Anand
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry for that illustration. This should be a better presentation.
-------------------------A(User)========================== B(User)
1 Read Operation---------10(Product qty)=============== 10(Product qty)
-------------------------Sees 10, makes 15 ============ Sees 10, makes 20
2 Update---------------- 15
3 Commit---------------- 15
4 Update ===============================================20
5 Commit ===============================================20
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic