It depends upon your application. For it to function optimally you should make each transaction on your application an SQL transaction, commit it on success or rollback if there is a problem. In that way you make each transaction atomic and maintain the integrity of your database.

Since Sqlite locks the entire database when it is being modified, transactions which modify the database can be made exclusive.

RohitPatel9999 wrote:
Thanks for clearing doubt.

Now question is...

While using SQLite dll Version 3.3.4 on Windows - Multiple threads/processes access SQLite database, - Each thread does some SELECTs, INSERTs or UPDATEs. Wrapping all read-only SELECEs with BEGIN TRANSACTION and using BEGIN EXCLUSIVE to wrap all UPDATEs or INSERTs (including their
related SELECTs),

Are their possibilities of writer starvation ? And if yes, what is the preferable solution ? (I mean what is the better
approach to handle that)

Thanks again.
Rohit


Reply via email to