3 ms·
I use SQLite almost all the time now on my desktop apps especially, for logging and other data intensive tasks that require only a single read/write thread. It
by cyberferret 10y ago
I use SQLite almost all the time now on my desktop apps especially, for logging and other data intensive tasks that require only a single read/write thread. It replaced text logging for me as searching and segregating log messages is now a breeze.
I've also used it as a main data store for single user Win32 apps.
In my early days of web app programming, I had an app that created a brand new SQLite data file for EACH customer that logged in and created an account on the web app. I thought it would be the most secure way to separate datasets and protect privacy for each user whilst negating the multiple write lock issues on the same SQLite database. Tip: Don't even bother to do this! The eventual data maintenance headache was far worse... :)
- stevekemp 10y agoMy personal favourite use for SQLite was for my blog. I wanted to use flat-files for storing individual entries, but I still wanted to present tag-views, and per-month entries. My solution was to create a simple SQlite database, import all the entries into it, and then generate the views by SELECTing from that store. Populating the database, even if it got thrown away immediately afterwards, was more efficient than trying to store all the entries in RAM. https://github.com/skx/chronicle2 https://github.com/skx/chronicle2
- cyberferret 10y agoYes, temp storage is another 'use case' for me too. On one particular web app I designed, there is a requirement for searching across multiple tables for text data. I simply transpose the columns I need from the different tables into a memory SQLite database 'on the fly' and perform a full text search on that for lightning quick responses and no need to do multi table joins.