Hi team, we are building up a ecommerce marketplace with both sides (sellers and buyers), now, we have made the forntend dev, but we are facing the choice of database selection. we would use Amazon S3 as cloud storage, but hard to choose the database between No-SQL (Heroku Postgres and MongoDB) For the tech stack; we are using Next.js and Node.js for the front and backend. so please share your professional input. thanks in advance
There are many things to consider when choosing between noSQL and SQL databases, but in short SQL databases are often more performant whereas noSQL databases are more friendly for developers to create and maintain.
Since you are building this website up from scratch it would be best to use MongoDB because it makes for an easier developer experience, cuts down on the time needed to setup a database, removes the need for someone specialized in database development (unlike SQL databases which needed to be engineered with tables and rows noSQL databases are rather intuitive), and is overall a better option for a startup.
Some considerations to keep in mind is switching from a noSQL database to a SQL database later on is very, very tricky. If you find that you want to improve performance or later prefer SQL databases it's not going to be an easy feat, however you may come to love noSQL databases and your team will also appreciate its simplicity as well. Another consideration is cost. I'm not familiar with the expenses involved in using Heroku PostgreSQL however MongoDB can be a financial overhead when your project starts to become more user-heavy and you perform more operations and store more data. You may want to perform a quick cost-analysis before choosing your preferred database.
I hope this helps you (or anyone else with a similar question in mind) out a bit and good luck with your marketplace!