4 ms·
There could/can be cases to use SQLite over SQL Server, MySQL, Postgres, etc. It really comes down to reasoning with the problem. For me personally, I have onl
by masfoobar 3y ago
There could/can be cases to use SQLite over SQL Server, MySQL, Postgres, etc. It really comes down to reasoning with the problem.
For me personally, I have only used SQLite for 2 scenarios.
1) When developing. SQLite is a simple method to getting something together, before building a proper MySQL/SQLServer/Postgres one.
2) Client software. Some client software needs a temporary data store and find SQLite great for this. These are not complicated databases. They barely have about 5 tables. Nothing more than a Queue system than anything, which goes over the wire via Rest API to a Messsaging Queue. Once sent over with a reply of "success" - it is removed from SQLite. It is a nice, simple system.
There can be a few other reasons.
Other than the above, I don't think I would be confident of SQLite file for a moderately sized database, likely to be used for some web portal or CMS system we created where more than one request could be talking to the database at the same time. This is why you should stick to those central, relational databases.
MySQL and Postgres, especially, are not that difficult to install, whether on the same system or its own dedicated server.
I hope my comment is not seen as a negative for SQLite. If anything, my attitude is the opposite. I really like the work and effort that has gone into SQLite. A virtual pat-on-the-back by those involved! It is a great approach to having data in 1 file, rather than writing your own.. or having lots of "records" in their own files (in a directory) which I have done.
- rmbyrro 3y agoI think it can be used for most things that have a low concurrency level and don't need real-time replication. There are replication "solutions" for SQLite, but then it stops being simple and you're better off using Postgres.
- masfoobar 3y agoAgreed. Admittedly, I cannot comment on replication options for Sqlite. I have not bothered to even look into this. To me, it already goes beyond the purpose of what makes Sqlite great --- to be a powerful sql in one file. Great for programs that need a storage solution without the reliability of being connected to another machine. In my client programs using Sqlite, it has been designed in such a way that if the Sqlite file is corrupted then it is not the end of the world. We know what didn't get sent to the server so we recreate the file and resend, etc. (However, our Sqlite files have been very reliable with the exception of software updates, but we ensure the sqlite db tables are empty before you can update the client software) Thats why I specified "client software" in my original comment, but I don't see why server-side daemons cannot use it as well. I guess If more than 1 program needs it, though, a combination of CRUD operations, I would recommend something else.