5 ms·
Depends on how you define database. Wikipedia starts with... ”A database is an organized collection of data, generally stored and accessed electronically from
by PopeDotNinja 7y ago
Depends on how you define database. Wikipedia starts with...
”A database is an organized collection of data, generally stored and accessed electronically from a computer system. Where databases are more complex they are often developed using formal design and modeling techniques." [1]
...which makes Redis sound like a database to me. If I am not technically correct, feel to educate me.
Side note: I try to focus on what problems we're trying to solve, because it's hard enough to get people to sync up on that.
I've found focusing on being right is inversely proportional to the health of my relationships.
[1] https://en.wikipedia.org/wiki/Database https://en.wikipedia.org/wiki/Database
- segmondy 7y agoYour filesystem then is a database. You can even stretch it to include your text editor. Redis is not a database.
- markbnj 7y agoYou could argue this endlessly from different perspectives, but it's not at all relevant to what the article actually discusses. They're comparing redis against itself, not other examples of things that might or might not be databases.
- futureastronaut 7y agoIf you use it as such, of course it is. Filesystem DBs been around forever. What point are you trying to make?
- KenanSulayman 7y agoOf course the filesystem is a database. In fact, bank mainframes still use distributed file systems as “databases” where file writes are auditable and fully reversible transactions. (I worked on such systems.)
- im3w1l 7y agoI think there is much to be learned by comparing databases and filesystems. One thing I think that filesystems can learn from databases is the notion of a compound primary key. It would be neat if app-files were identified by an (app, type, id) tuple. This would bring the advantages of both the posix and the windows filesystem layouts. For instance if we had(app=firefox, type=/usr/bin, id=main). Then we could easily find all firefox files by querying by app. Or we could easily find all binaries in PATH by querying by type. ps. I think this would work better than the overly general tag-based filesystem people sometimes propose.
- dvirsky 7y agoWell, that's basically what directories are.
- im3w1l 7y agoThe posix filesystem layout doesn't provide an easy way of enumerate all files belonging to a given program. The traditional windows (98?) layout of one app in one folder conversely doesn't easily allow enumerating all binaries. Or all manual entries. Etc
- dvirsky 7y agoOk, so let's say you arrange your folders to acommodate for that. you have /files/$user/$program/$file. That's basically what a primary key in a database looks like. If you want a secondary index, what databases often do is just create a second table with a different primary key, with the value being primary keys of the main table. We can model that in a filesystem as well, of course. So if I want one filtering by file type and one filtering by month of creation, then I can create /files/$program/$file and then ln -s /files/$program/$file /files/month/$month/$file
- nkozyra 7y ago> Your filesystem then is a database. Absolutely
- sk5t 7y agoIn a few years, you may look back and wonder, incredulously, that you ever felt a filesystem might not be a kind of database. Look into filesystems long enough, and you may start to view an RDBMS as a specialized kind of filesystem.