Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQLite for client-server

I've seen a couple of SQLite performance questions here on Stackoverflow, but the focus was on websites, and I'm considering using this DB in a client-server scenario:

  • I expect 1-10 clients for one server for now, could go up to 50 or more in the future.
  • slightly more reads than writes
  • the DB would sit behind a server process (i.e: not using direct DB access through a network)

Would using SQLite make the app less responsive as opposed to using PostgreSQL? My intuition tells me that it should be ok for these loads, but maybe someone has some practical experience with this kind of scenario.

like image 282
rpg Avatar asked Aug 24 '09 10:08

rpg


People also ask

Is SQLite a client server?

SQLite is a relational database management system contained in a C programming library. In contrast to many other database management systems, SQLite is not a client–server database engine. Rather, it is embedded into the end program. SQLite is an open source SQL database that stores data to a text file on a device.

Can SQLite be used on a server?

SQLite is an embedded database and it is not intended to be used as a client/server DB. If you really want to, you can use SQLitening.

How is SQLite different from client server database?

MySQL uses a database server to run on a network, which can then be accessed by the client. SQLite, however, is what is known as an embedded database. This means that the structure is stored on the application itself.


1 Answers

I did use SQLite for a major client/server product used with ~10 concurrent users and I deeply regret that decision. In my opinion - PostgreSQL is much more suitable for client/server scenarios than SQLite due to its fine locking granularity.

You simply can't get very far when the entire database is locked whenever someone needs to write something ..

I like SQLite very much (I even wrote a commercial utility for comparing SQLite databases - SQLite Compare but I don't think it fits the bill when you have client/server scenarios.

Even SQLite's author says that it should be used as a replacement for custom file formats and not as a full blown database server. I wish I took his advice more seriously..

like image 61
Liron Levi Avatar answered Oct 23 '22 18:10

Liron Levi