4 ms·
Suppose you don't have SQLite, how do you open a SQLite database? The only way is you have to re-implement SQLite from scratch. Good luck with that. Now imagin
by bdjsiqoocwk 2y ago
Suppose you don't have SQLite, how do you open a SQLite database? The only way is you have to re-implement SQLite from scratch. Good luck with that.
Now imagine you don't have vim, how do you open an XML file? You can use any of other thousands of text editors out there, or any of tens of libs in tens of different languages.
I think your take that sqlite is simpler than a text file is the weird one.
- jjav 2y ago> Suppose you don't have SQLite, how do you open a SQLite database? The only way is you have to re-implement SQLite from scratch. Good luck with that. Or, you know, install SQLite. Although it is so ubiquitous that it is almost certainly installed already. Even on a mac it's there already. Or if you are on some system where it is not, a single package install away.
- bdjsiqoocwk 2y agoYes, I know what to do. Doesn't change the fact it's more complex. In fact, any database is more complex than a text file. You sound like the kind of person to push at work for a database when a file would suffice, introducing needless complexity.
- jjav 2y ago> In fact, any database is more complex than a text file. This statement is true, at a very superficial level. But it is missing all the nunace that goes into why would someone be using this file. Are you comparing opening a text file in a text editor vs. opening the db.sqlite file in a text editor? Yes, of course the text file is more usable. But what is the use case of just staring at the file? I can't imagine any. If you are someone who wants to programmatically use the contents of that file (outside gnucash application), surely you are writing code to process the data. And thus, being able to use SQL is massively more convenient.
- consteval 2y ago> You sound like the kind of person to push at work for a database when a file would suffice, introducing needless complexity Simplicity versus complexity is not a linear scale like you describe. Complex tools can lead to simpler implementations. This is the key people are missing. For example, C++ is much more complex than C. Okay, now build a generic sequential data structure. It's a quarter the LOC in C++ versus C, and it's a much simpler implementation. Because C lacks the tools, so we have to use macros or maybe void pointers. In this case, imagine you need to aggregate lots of data from different places, eliminate some of it, collapse some of it etc. For a reporting type thing. Well, SQLite is more complex than XML. But doing this in SQL is much less complex, because XML lacks the tools. SQL is built for this, so you can do it in a quarter the amount of code, or maybe even less.
- deleted 2y ago[deleted]