3 ms·
A file system is essentially a single node document store indexed with a key that is the file path. It's a database!
by bbcbasic 9y ago
A file system is essentially a single node document store indexed with a key that is the file path. It's a database!
- peterwwillis 9y agoA filesystem is a filesystem. A database is a database. We have different words for things for a reason. If you wanted to compare a filesystem to a database, it's more a hierarchial collection of tables whose columns are the file stat() with a binary record at the end of each row. But it's somewhat of a useless database because its features are all oriented at its storage backend, not accessing the data. A real database allows you to optimize queries and search, index, join and select data at once and efficiently handles the more complex aspects of accessing and writing so you don't have to implement it yourself. If you need a database, _use a database_. Tech hipsters need to stop badly reinventing the wheel.
- bbcbasic 9y agoThis is a bit true Scotsman. By viewing a filesystem as a type of db you can think more laterally about your tech choices.