3 ms·
What is the equivalent of a directory, and of a file? From the relation point of view, what would your tables be? It doesn't map that well, the idea sounds int
by jasfi 5y ago
What is the equivalent of a directory, and of a file? From the relation point of view, what would your tables be?
It doesn't map that well, the idea sounds intriguing, but in practice a filesystem seems like a better model for files.
- dagss 5y agoYou would not have a "directory" in the sense you use the word (why would directory be required in a FILE system?) Instead a heap of files and you search for them using metadata (e.g. each file has an associated key value store that you search on). Music catalogues is a good example. In the 90s one vould wonder if the music sitting on HD should be organized as "Music/(genre)/(artist)" or "Music/(artist)/(genre)" as directories. Different choices was best for different persons. Eventually many music players for desktop (e.g. iTunes) just made a different metaphor. And Spotify, Netflix etc do not use a hierarchy but you search for items using metadata. Another example is e.g. /lib/libfoo-1.2.so Where one could instead have libraryname=foo scope=system version=1.2 sharedlibrary=true Or similar
- mnsc 5y ago> Music/(artist)/(genre) Well that's only necessary when your music library contains Zappa.
- jasfi 5y agoThat's not relational, that's closer to a NoSQL store.
- dagss 5y agoThat is orthogonal, NoSQL can be used as a relational DB too. SQL is one way to do a relational DB. Also what I describe is close to SQL if e.g. you declare a set of properties and property types for each "filetype". Relational is one aspect of a DB. Schemaless or not is another aspect.
- zozbot234 5y agoA "file" is just a key-value entry where the "key" is some label in an arbitrary namespace, and the "value" is a blob of bytes. The "directories" of a relational FS would be dynamically generated: they would arise as query result sets based on user input, as opposed to being fixed and materialized on-disk. This is how the relational FS worked in BeOS, but the exact same "virtual directory" feature was also ported to some versions of Windows.