in reply to Re: Poor Person's Database
in thread Poor Person's Database

I second the advice of using DBM instead of flat files. Flat files tend to get quite messy, don't scale well, and are extremely difficult to maintain.

Been there, done that, got the scars to prove it. Yes, you don't really want to go down this road if you can help it.

However, if you are brave and insist on this approach, the sub-directory approach is the way to go. I would only recommend naming the subdirectories differently, to whit:

being => /www/search/b/e/ing.dat suing => /www/search/s/u/ing.dat

versus

being => /www/search/b/be/being.dat suing => /www/search/s/su/suing.dat

From bitter experience, I can tell you that one day someone will accidently copy files from one directory to another and your application will start to behave in an erratic manner that will be hard to track down.


--
g r i n d e r