C
C#14mo ago
Pandetthe

File types

Hi! I am experimenting with datastoring and I am kinda curious what is the best file type for reading, writing, removing and updating records. I am not thinking about some db but for example json, csv or yaml. File type that can be read and written line by line like csv and with possibility to remove and update records like json.
9 Replies
ero
ero14mo ago
Json is probably going to be the easiest and best supported
Pandetthe
Pandetthe14mo ago
But what will be the fastest for more amount of records?
ffmpeg -i me -f null -
with text it's a lose-lose 😐
Keswiik
Keswiik14mo ago
You say "I am not thinking about some db", but your problem description makes it sound like you need a database. Just use SQLite and save yourself the headache. Using json to hold and update a large amount of records, assuming everything is in the same file, isn't going to be very performant.
Pandetthe
Pandetthe14mo ago
Okay, thank you guys. I was just curious
ffmpeg -i me -f null -
wasn't there a mysql text mode? but maybe it was readonly
ero
ero14mo ago
Json is gonna be fine if you only deserialize and serialize at startup and shutdown But if that's not the case, then do use a db like suggested
ffmpeg -i me -f null -
by the way you said json, csv, yaml, but there is also xml
Pandetthe
Pandetthe14mo ago
I know