<NON RDBMS EXPERT'S OPINION>
For fixed length records you should probably manage an index and then use
seek
or sysseek to reach the correct record in your file (avoiding to scan the entire file...)
For variable length record I would use fixed sized 'chunk'
who would contain variable length records...
Hence you wouldn't have to scan the whole file but rather only a 'chunk' to find your record...
(The fixed 'chunk allow you to use an optimized structure
with fixed size bloc, indexs and seek...)
But you can 'feel' it isn't 'serious'...
IMHO any decent RDBMS should use already well theorized
structure
Like BTree or B+Tree (where data and indexes are mixed in the same file!)...
</NON RDBMS EXPERT'S OPINION>
"
Only
Bad
Coders
Code
Badly
In
Perl" (OBC2BIP)