| I think I found a problem and would like your feedback on it. If I access fields by their byte position in the file, then records need to be stored in byte form. When working with numbers, this could mean that a newline (byte 13) is stored to represent 1101 which would happen, for example, on record 13. This could be a real pain as the records would not then be CSVs. Subsequently, I'm thinking of not storing by byte and just storing strings and then reading in one line at a time, comparing the first field to see if it contains the primary key and looping through the whole file that way.
Does anyone see a more efficient means of accessing data randomly while addressing problems of bytes? Am I missing something? Am I making it too complicated?
Your feedback and suggestions are very much appreciated. |