4 ms·
How practicle is it to have a textfile based database with an SQLite API?
I know it's going to have horrible performance, but I do wonder if it's possible to write such a text file based database (even if you have to restrict to just ascii content).
The idea is maybe you just want a simple personal database where all the data is not in a binary format but in files and folder?
But with room to transition towards an actual SQLite database when you want to take it further?
- DemocracyFTW2 3y agoIf I were charged with this task I'd probably take an actual SQLite DB and write methods to parse data from text files, then process it within SQLite, and serialize it back to the text file when an API method is called or after each processing step. A fresh DB engine, fully re-implemented to match SQLite's API is insane unless you're a prodigy or have a sizable team and will come with numerous downsides. I can recommend https://github.com/WiseLibs/better-sqlite3 https://github.com/WiseLibs/better-sqlite3 and https://github.com/loveencounterflow/dbay https://github.com/loveencounterflow/dbay
- theGeatZhopa 3y agoFlat file database is the term you search for.
- DemocracyFTW2 3y agoExactly. And you'll find a lot of stuff. Much of the Linux OS' and apps' configuration happens in editable, human-readable 'flat' files. The advantage of this is that you can read and edit them, the disadvantage is that there are a bazillion of competing text formats out there, which each format being a law on its own, as it were. There's also probably a lot of duplication going on in applications that implement their own methods to parse, process, and serialize configuration settings instead of using a common set of well-known tools with well-known properties (features & limitations/bugs). It is a mess.
- rzzzwilson 3y agoJust use SQLite. https://www.sqlite.org/index.html https://www.sqlite.org/index.html
- beardyw 3y agoI think I remember the MS log analyser had some SQL like features which made it really powerful.