• Post Reply Bookmark Topic Watch Topic
  • New Topic

Transactions Usage in applications  RSS feed

 
Ranch Hand
Posts: 259
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: 8994
168
  • 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: 259
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.
 
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!