Here is one example, but there are many ways to implement it
Code: Select all
-{ Databases
| -{ Pet_Packages (each directory is a "database")
| | -{ Abiword (each subdirectory is a "record")
| | | -pkg_name (contents of file is abiword-2.8.6.pet)
| | | -version (contents of file is 2.8.6)
| | | -dependencies (contents of file is gtk2,...)
....
Here are some advantages:
- Ext4, btrfs and most other modern filesystems allow each small entry to be stored within the inode (Ext4 has the smallest limit of 60 bytes) so you get similar access to a database, but with the advantage that larger entities are still possible without modification
- You can use standard tools to query the "database" for example:
grep gtk2 $HOME/Databases/Pet_Packages/*/dependencies
- It is as scalable as the backing filesystem
- It is easy to share entries within and between databases with links
- The filesystem keeps track of mod and access time to make it easy to sync only changed entries (using rsync for example)