I have a question for you guys, what is the best practice for using a local sqlite database on a permanent server (running 24/7):
1. Open the connection once (when server starts) and reuse it forever while the server is running.
2. Open and close the connection every time a query to the database is made.
Both have pros and cons, i ask for advice based on personal experience.
SQLite databases are very easy to use as they don't require any additional software or configuration. SQLite support for concurrent access is not comparable to server based databases such as MySQL and others. However they can still be perfect for small / medium solutions, especially if there...
Using the WAL mode is a good choice. SQLite works fine if you don't have millions of updates in a short time (works but slows down). Just give it a try. Switching to MySQL is quite easy. It (of course) all depends on the amount of db traffic.