3 ms·
Perhaps you could answer the opposite question: Why would I use flatfile (aside from the fact I've never heard of it) over SQLite? So far you've just said SQLi
by quietbritishjim 6y ago
Perhaps you could answer the opposite question:
Why would I use flatfile (aside from the fact I've never heard of it) over SQLite? So far you've just said SQLite has some features you can't imagine I'd ever need, but even if that were true then it wouldn't be a problem in itself. What are things that are actually bad about SQLite compared to the alternative you're suggesting?
- dmd 6y agoYou've never heard of using a file to store data in?
- quietbritishjim 6y agoThe 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.
- techbio 6y agoPossibly adding the complexity of SQL, or an ORM, in their use case is a layer of complexity beyond reading and writing serialized data structures to text. Not sure why the sibling posters determined s/flatfile/flatfiles/ the most interesting part of your question.