1
Non-Mafia Game Threads / Re: The Necro Wars
« on: June 22, 2022, 08:50:31 am »there's probably some kind of a tree structure going on in the background
yes, there is
I still think it's fair to say that having a datastructure that you can find elements in O(ln(n)) time is the main idea of a data base? Yes, you can also do that with a text file. You can have text in a text file sorted. You can have several text files that structure your data. You can in-principle keep a structure that gives you O(ln(n)) access time forever, along with optimality on all the other operations. You can have a text file such that you maintain an implicit tree over it.
But then you're just emulating the properties of a data base manually instead of automatically. I mean, ultimately there is no sharp distinction between any of this stuff. "Database" is not a primitive object in the computer, ultimately it's all processor operations over binary data.
So maybe a more accurate description would be "there's a bunch of nice properties that you'd like your data to have, and if your use case requires large amounts of data, at some points it becomes sensible to automate those, and that's a data base. But like, pedagogically simplifying it to "databases keep your elements sorted and that gives you faster access time"... still seems reasonable to me
Worth noting, SQLite does store its database in a single file.