When and why do you have to store json in the database?

Question:

I'm used to creating a database with tables based on those entities that come with json, writing converters from SQL to object representation and vice versa, or using ORM. But now I'm looking in the project, a person simply writes json to the database and through GSON, when accessing the database, converts it back into objects. There should be not so many entities in total, but I do not understand why it was necessary to write just json into one table. I have already heard a lot about such data storage in a database, but I do not fully understand why this should be done. Please tell me when it makes sense ?!

Answer:

I believe that JSON can store data in a database in the event that you do not need to select from them. That is, when, in any case, all data is loaded from the database at once.
But, as for me, in this case it is better to do without a database at all, since its meaning is to allow you to make a selection. I would simply store such data in a file.

Scroll to Top