If you actually need to MODIFY the "database", random CSV will not work. I thought the database was static (error lookup).
CSV only works for complete import/export of the entire database. Files are like RAM, so you just cannot just insert a record 28 characters long, or replace one of 20 characters with one that is 22 characters. Flash ROM/file systems don't work that way. This is why databases are fast and $$$ and LOTs of code.
The only way this could work is if you had a FIXED record format. Think COBOL 1968. Every record is a FIXED 40 characters (64, whatever). Hence, record at 40, 80, 120, etc. You would need to maintain a list of DELETED records in a separate file. And a list of KEY->INDEX values in a third file. You could maintain the KEY->INDEX in the RAM drive, or even a UDT block, that you can easily regenerate on a moment's notice (but the MAIN TABLE will NOT need to be rewritten). Deleted records would also need to be flagged in the primary file (think FAT file system), this way you could re-generate the DELETED records quickly by looking at that flag one time at startup (the same time you re-generate the Key->index map).
it's do-able. What's cool about Do-more is you can tweak the .TimeSlice to trade off calendar time with scan time. Higher .TimeSlice (in microseconds), the more database processing you get done per PLC scan, at the price of bumping the PLC scan. A lower .TimeSlice means less time doing database work every scan, so your PLC scans are faster, but your database operations take longer calendar-time-wise.