• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Many connections to DB

 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do I need to do in order to insure that only one person is accessing the database at a time if multiple people will have the application that interacts with it. Or is this even something I should concern myself with.
 
Barrett
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It may, or may not be a concern. That depends on your application.
Here's a scenario to consider: 2 people read the same data from the database. Person #1 updates the data. Person #2 has no way to know that the data has been updated. Now person #2 submits their update. This wipes out person #1's changes.
If it's highly unlikely that a situation like this can occur it may not be worth worrying about. Depending on the type of application you are writing, it may or may not be an issue.
 
Stanley Tan
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, you probably want to watch out for the lost update scenario.
You also have to very careful as to which DBMS you are using. Different vendors implement locking and concurrency control different (especially Oracle) so you must be very aware of implementation to use the database efficiently.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic