Will two programs using SqlAlchemy conflict when trying to access the same table (SQLite)?

Go To StackoverFlow.com

2

I'm going to have two independent programs (using SqlAlchemy / ORM / Declarative)
that will inevitably try to access the same database-file/table(SQLite) at the same time.
They could both want to read or write to that table.
Will there be a conflict when this happens?
If the answer is yes, how could this be handled?

2012-04-03 20:40
by Honest Abe
possible duplicate: http://stackoverflow.com/questions/4060772/sqlite3-concurrent-acces - alan 2012-04-03 20:47
@alan Thanks, I didn't find that in my searches, nor did it popup when I was writing this question - Honest Abe 2012-04-03 20:59
Hope it helped answer your question. Cheers - alan 2012-04-03 21:02


3

Sqlite is resistant to any issues as you describe. http://www.sqlite.org/howtocorrupt.html gives you details on what could cause problems, and they're generally isolated from anything the code might accidentally do.

If you're concerned due to the nature of your application data access, use BEGIN TRANSACTION and COMMIT/ROLLBACK as appropriate. If your transactions are single query access (that is, you're not reading a value in one query and then changing it in another relative to what you already read), this should not be necessary.

2012-04-03 20:48
by mah