DEV Community

hoangviet97
hoangviet97

Posted on

MySQL or MongoDB?

Hello everyone. If I want to build web app like Trello or Asana with NodeJS and React, which database type should I use? MongoDB or MySQL(or another relational database...)?

Top comments (3)

Collapse
 
ctvanzandt42 profile image
Curtis Vanzandt

It depends on the data you're saving. If the data doesn't need to be linked in some way, a NoSQL solution is a good way to go. If your data is going to be strict in schema and needs to have some kind of relationship with other types of data, I'd go for a relational database.

Collapse
 
leob profile image
leob

Is the goal of the app just to learn something or is it going to be a production app?

I've used Mongo in the past, but for your average web app I think it's a poor choice ... unless you're going for mega huge scalability (in case of which there's a lot to be said for Mongo), do yourself a favor and go with an RDBMS - so much easier to use ...

MySQL or PostgreSQL or another RDBMS doesn't really matter, it's a toss-up IMO.

Collapse
 
margo_hdb profile image
Margo McCabe

Great question - there are so many options! This database architectures & use cases article might be helpful.