• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Transactions Usage in applications  RSS feed

 
Ranch Hand
Posts: 340
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have an application where we just read the data from the database. So, does it need to have any kind of transactions?

I believe transactions would be helpful in case we add/update any data. Please help me in understand if transactions are required for reading the data only?
 
Saloon Keeper
Posts: 9248
177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you guarantee that nothing, not even another application, will ever write to the database? If so, you don't need transactions. But if there's even the slightest chance that something or somebody will write to the database while your application is running, you need transactions when you read something.
 
Vaibhav Gargs
Ranch Hand
Posts: 340
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes Stephan, no other application is using that database and only our application is reading those tables in the schema no update/add statements.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!