If you want to use the filesystem, just use directories and have a hierarchy represent your database...
If you want speed, get a real database...
Most Unix-style algorithms favor simplicity...(KISS).
marty