• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Many connections to DB

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic