DEV Community

Discussion on: A sample e-commerce web app built with ReactJS, ExpressJS and MongoDB

Collapse
 
noncototient profile image
Bo

Not to hate on this, but is anyone still using MongoDB for new projects? A lot of devs I've spoken with who had chosen to use MongoDB regretted their decision later.

Collapse
 
aquibsayyed42 profile image
aquib sayyed

What's the better alternative? I'm new and looking to learn database.

Collapse
 
aitor profile image
dragonDScript

Postgres SQL is the most popular but SQLite3 and MySQL are fine :)

Thread Thread
 
noncototient profile image
Bo

MySQL feels a little easier to work with compare to PostgreSQL and in my experience a lot easier to find answers to issues that you might run into during development with MySQL.

Collapse
 
noncototient profile image
Bo

Definitely MySQL.

Thread Thread
 
aquibsayyed42 profile image
aquib sayyed

Ok thanks

Thread Thread
 
activenode profile image
David Lorenz • Edited

To be precise: There is no "better" option of both. I do relate with "many regretted it" because relational database such as MySQL, PSQL (which I recommend over MySQL) are still state-of-the-art but the power of NoSQL DBs such as MongoDB must not be underestimated. I think the problem is that people start with NoSQL databases before they got a proper education how to work with it - I did the same. And hence they feel like missing out their well-known relational structures - which is a valid and fair point.

But I think it is really not as simple as saying: One is better than the other :)

There are a lot of really good "Relational Database vs Document-based Database" articles out there so I would recommend starting to read those and then depending on what fits your needs making the decision 👍

Thread Thread
 
noncototient profile image
Bo

For beginners nothing can beat MySQL, though. Even for majority of projects a simple relational DB like MySQL or PostgreSQL is the best choice. The only successful use of MongoDB that I know about in the wild is Trello.

Thread Thread
 
activenode profile image
David Lorenz

I disagree to the extent that as always in business it comes down to a proper pre-analysis. Depending on which type of learner you are NoSQL / SQL can be easier. That really is individual. Stating "Nothing can beat MySQL" is a very absolute expression. In IT things can rarely be seen absolute but always depend on the individual and the business case: linkedin.com/pulse/why-amazon-goog...

Collapse
 
caigengliang profile image
chase

which one is more in line with the business,which one is batter

Collapse
 
bryangarciad profile image
Bryan Ramses Garcia

I believe that all NO-SQL engines are amazing but I also believe that the nature of the data and how we handle it 90% of the times fits better with SQL engines because of the high quality features for relational models, so if we go with hype driven development we can make mistakes choosing tech stack

Collapse
 
noncototient profile image
Bo

I agree with this, the way most web applications work fits really well with a simple SQL database be it MySQL or PostgreSQL.