Local storage: MySQL vs JSON?

I am working on an application that will analyze, process and format many data blocks (data on stellar position and brightness). One night of data can have a dozen files, each of which consists of several hundred lines. I have two options for storing and accessing raw data files: database (MySQL) or JSON. All this happens in the local environment, so the throughput and request time are practically insignificant, but I do not know enough about which option is better to say.

Can you, the enlightened SO community, share your knowledge of whether choices are clear or not? I really don't need to fragment the data, so the relational capabilities of MySQL are controversial - just wondering whether it's faster or easier.

(I tried my best to evade the "best" taboo - if I can change or clarify, please let me know!)


EDIT . Seriously anonymous closed voices do not help. I would like to know how to better formulate my questions so as not to waste time on everything - tell me what I can do to change it!

+7
source share
2 answers

If you're always going to save and load entire datasets and don't have to perform complex queries, JSON is probably an easier and more efficient way. But if you really want to be sure, you have to compare them.

There are also databases with less overhead than MySQL, such as SQLite.

+6
source

Are you going to download and use the ENTRE data set sequentially, or do you really want a part of it?

Use a database (mySql or Sqlite or something else) if you want something that gives you a database, in particular, in this case, the ability to query your dataset. (Security, normalization, and standardization are nice too.)

Use a raw file (csv, xml, json) if you do not want the database to provide something, and you still want to load all its data into memory.

+3
source

All Articles