Full Stack Developer at Infynno Solutions·
Needs advice

I want to store the data retrieved from multiple APIs and perform some analytics on it. The data stored in DB will never/hardly change. First, I thought it would be better to retrieve the data and create table columns for them, but some data might have different columns than others. So I thought about storing the JSON response from API directly to the table and use it. So which database will be the better choice, PostgreSQL or MongoDB.

7 upvotes·84.8K views
Replies (6)
Back End Developer at instabox·

Looks like the use case is to store JSON data. mongoDB and Postgres differ in so many aspects like scaling and consistency. Postgres has excellent JSON support now with the power of SQL. MongoDB is good in handling schema less data. However in this case it seems these differences don’t matter that much. I’d recommend you go with what you are most comfortable with.

Tarun Batra (tarunbatra.com)
3 upvotes·73.3K views
Sr. Backend Engineer at Grappus·

Hey Krunal, your requirement sounds pretty clear and specific to what you want to do with that data. My recommendation to you, would be to use MongoDB. Since schema-less IO is faster in MongoDB, your general speed of reading / writing from and to the database would be quick. Additionally, the aggregate framework is very powerful with large data so that is also something that you can use in computing your analytics.

8 upvotes·77.1K views
View all (6)
Avatar of Tarun Batra

Tarun Batra

Back End Developer at instabox