in reply to fast lookups in files
Instead of using a full relational database, how about using dbmopen? It binds a hash to a Berkley DB file. Unless you use "keys" or "values", you should be fine with that, I guess.