3 ms·
The question was what is the benefit of flatfile over SQLite. SQLite stores the database in a single file, so "it uses a file" is not an answer to that.
by quietbritishjim 6y ago
The question was what is the benefit of flatfile over SQLite. SQLite stores the database in a single file, so "it uses a file" is not an answer to that.
- dmd 6y agoMy comment was that you seem to be under the impression that there is a piece of software or file format named 'flatfile'.
- quietbritishjim 6y agoOh. It would've been easier if you'd just said that in your first comment. Looking back, you seem to be right. I thought mlthoughts2018 was referring to a specific file format, or at least a specific library because (1) They made up that weird terminology "flatfile" which looks like product name instead of just saying "plain text file" ... I wonder why they did that? (2) They made claims about transactional integrity with a WAL-like log. Now I realise they were suggesting you homebrew that anew for each fresh project that needs to store data! The idea that this would be easier than just using SQLite's existing mechanisms is so bizarre it didn't even enter my head they could've meant that.
- nl 6y agoFlatfile means a plain text file, generally one you can process on a row-by-row basis. It sounds like you think there is some software called "flatfile", but it is a reasonably common term. There are advantages over SQLite, eg: the ability to use unix command line tools against the file directly. In my view SQLite has more advantages though.
- HelloNurse 6y agoAltering data with text editors is more or less the opposite of the integrity afforded by a database. Of course principled command-line tools for text (e.g. awk) and the possibility of running arbitrary SQL queries on a database blur the line, but the distinction between files that are read or written once as a step in a transformation pipeline or as something to load or save and databases that represent a persistent state, with transactions, remains sharp.