Can SQLite support multiple users?

Sqlite

Sqlite Problem Overview


I am trying to develop a Windows based application with multiple users accessing the same database at the same time. Can SQLite support multiple accesses at one time? Is SQLite stable in this regard? What makes SQLite better or worse than MS SQL CE?

Thanks.

Sqlite Solutions


Solution 1 - Sqlite

Yes SQLite can support multiple users at once. It does however lock the whole database when writing, so if you have lots of concurrent writes it is not the database you want (usually the time the database is locked is a few milliseconds - so for most uses this does not matter). But it is very well tested and very stable (and widely used) so you can trust it.

You may read this short document for information when to use SQLite and not: http://www.sqlite.org/whentouse.html

Solution 2 - Sqlite

Yes.
From paragraph #5 in SQLite FAQ:

>Multiple processes can have the same database open at the same time. Multiple processes can be doing a SELECT at the same time. But only one process can be making changes to the database at any moment in time, however.

Solution 3 - Sqlite

If concurrent writes are an issue, you may want to look at Berkeley DB. The SQL API is completely SQLite compatible. In fact, it incorporates the SQLite executor top of Berkeley DB's storage engine, which does support multiple concurrent write operations.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestioninbluesView Question on Stackoverflow
Solution 1 - SqliteAnders ZommarinView Answer on Stackoverflow
Solution 2 - SqliteVooozaView Answer on Stackoverflow
Solution 3 - SqlitedsegleauView Answer on Stackoverflow