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 supports an unlimited number of simultaneous readers, but it will only allow one writer at any instant in time.
To transfer an SQLite database found on the development computer to an Android device, the database can be added into the apk archive of the application. This operation can be performed when creating the Android archive, in the "Integrating files" screen.
One of the main drawbacks of the SQLite system is its lack of multi-user capabilities which can be found in full-fledged RDBMS systems like MySQL and PostgreSQL. This translates to a lack of granular access control, a friendly user management system, and security capabilities beyond encrypting the database file itself.
High write volumes: SQLite allows only one write operation to take place at any given time, which significantly limits its throughput. If your application requires lots of write operations or multiple concurrent writers, SQLite may not be adequate for your needs.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With