weaknessforcats:
Thank you very much for the answer. I am doing b-tree based indexing for a database (although not sql) so your approach looks good.
Did you use b-trees? If so, how did you store pages?
I see two possibilities:
- each page as separate file
- whole tree in one large file
Pages were stored in text mode in the segment files.
An application record was just segment numbers:
2747945
8392783
3993204
To read data you took the segment number and accessed the tree of used segments. Maybe 2747945 was on volume SEGS123 along the path servername\root\segments\segments2747000.txt. If the segments are 10K, segment 0 would be at seek location 0 (this is segment 2747000). Therefore, segment 2747945 should be at seek location 945 * 10K (assuming 10K segments).
The format of the data in the segment was application independent.
Once the database was generated, segment files were never created or deleted. The trees were re-organized daily in the wee hours.
As I say, once the file handlers were working, I was off to the races and could devote the rest of my time to the client's application.
I'm sure there are better methods today but this is what I did in 1975. I had to manage a 500MB master file when the largest disc drive I had held 7.5MB. Each server supported 8 disc volumes so about 65 servers were used for the application.