Answer the question
In order to leave comments, you need to log in
Is it advisable to store user posts in json?
Hello!
The question is a little strange, I explain:
There is a Mysql database, user posts can be stored in this database, each post can contain images, videos, and so on. I want to put all the posts in a separate json file and store the paths to the files in Mysql.
Is this method reasonable given that json is easier to pass to the frontend?
Again, I apologize for my strange question, just curious.
Who so already did otpishite please, I will be glad!
Answer the question
In order to leave comments, you need to log in
Not in the way you propose. Tk what's the point then in the SQL-base, if everything is possible in files?
Take a look at MongoDB - I think that's what you need.
Another option - you can create separate labels for different attachments to the post and save there some identifiers of pictures / videos in an external system (files are also an external system).
But if you do not plan any kind of relationship between entities, then mongo is a good choice, especially since there is already a ready-made solution for storing files - GridFS
given that json is easier to pass to the frontend
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question