One way to do it would be to put the data you want in fixed width records on the SD card. At startup, read the ids into an array in RAM and use it as an index into the SD file so you can simply seek to the record you want. Of course, depending on how fast this needs to be, you might find a 'full table scan' of the SD file every time you see a new ID might be sufficient.