Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Actually, the directory structure approach isn't a bad solution. If you can still find some literature, take a look at discussions of the internals of the old dBase II or FoxPro (DOS version). I think IBM's DB2 also uses a hierarchical directory structure but I'm not sure about that. I did a fair amount of that kind of work in the eighties.
Although I'm a little hazy on the details now, I had a layout similar to what you described. Under a parent "db" directory, I had subdirectories for each database which contained fixed length text files for the tables. I also had batch files and other programs for data extraction and rudimentary reporting. I didn't know about SQL back then. I used fixed length records so that I could index each row based on its position in the file. Back when PC's were <4MHz reading through a file line by line could be a lot slower than a single seek to specific byte position in a file. I believe I used a single "metadata" (I didn't call it that) directory to store info about the tables. I had a subdir in the metadata directory for each database with files having the same table names containing the col structure and the like. For a while, before I discovered dBase II, I used an ISAM implementation for indexing (in BASIC no less). I believe I got it out of PC Magazine. Now that I think of it, PC Mag had a lot of stuff like that back then. Perhaps you could try their archives from, say, 1983 - 1987. I'm sorry that I can't give you too many specifics. My implmentations were pretty primative, I thought, but I do remember being pleased when my layout matched the dBaseII implementation. Good luck PJ unspoken but ever present -- use strict; use warnings; use diagnostics; (if needed)In reply to Re: (Real) Database Design
by periapt
|
|