| ▲ | JoeAltmaier 6 hours ago | ||||||||||||||||||||||
Digression: a file system is a terrible abstraction. The ceremonial file tree, where branches are directories and you have to hang your file on a particular branch like a Christmas ornament. Relational is better. Hell, and kind of unique identifier would be nice. So many better ways to organize data stores. | |||||||||||||||||||||||
| ▲ | zarzavat 6 hours ago | parent | next [-] | ||||||||||||||||||||||
Filesystems have a property that changes preserve locality. A change made to one branch of the tree doesn't affect other branches (except for links). Databases lack this property: any UPDATE or DELETE can potentially affect any row depending on the condition. This makes them powerful but also scary. I don't want that every time I delete a file it potentially does a rm -rf / if I mistype the query. The best compromise is what modern OSs have: a tree-like structure to store files but a database index on top for queries. | |||||||||||||||||||||||
| |||||||||||||||||||||||
| ▲ | p_ing 6 hours ago | parent | prev | next [-] | ||||||||||||||||||||||
NTFS has a database, the MFT. It can index attributes, such as file names, which are a b+tree. A file's $DATA is also placed into the MFT, unless it doesn't fit, then NTFS allocates virtual cluster numbers (more MFT attributes) which point to the on-disk data structure of the file. All files are represented in a table with rows and columns. "Directories" simply have a special "directory = true" attribute in a row (simplified). The hierarchy is for you, the human. Like many file systems, NTFS also contains a log for recoverability/rollback purposes. It's not quite relational but it doesn't make sense to be relational. Why would you need more than one 'table' to contain everything you need to know about a file? Microsoft experimented with WinFS, which wasn't a traditional file system (it was an MSSQL database with BLOB storage which sat ontop of a regular NTFS volume). Performance was bad and Skydrive replaced the need for it (in the view of MSFT). | |||||||||||||||||||||||
| |||||||||||||||||||||||
| ▲ | packetlost 6 hours ago | parent | prev | next [-] | ||||||||||||||||||||||
Files in most file systems are uniquely identified by inode and can be referenced by multiple files. Why does everyone forget links? | |||||||||||||||||||||||
| |||||||||||||||||||||||
| ▲ | mieubrisse 6 hours ago | parent | prev [-] | ||||||||||||||||||||||
I've been wondering this too: for us, UUIDs are super opaque. But for an agent, two UUIDs are distinct as day and night. Is the best filesystem just blob storage S3 style with good indexes, and a bit of context on where everything lives? One thing directories solve: they're great grouping mechanisms. "All the Q3 stuff lives in this directory" I bet we move towards a world where files are just UUIDs, then directory structures get created on demand, like tags. | |||||||||||||||||||||||
| |||||||||||||||||||||||