Hello, I wanna build an e-commerce website for myself and planning to build for others in the future. I really like Node.js, React, ExpressJS. But I don't know if MySQL or MongoDB is what suits me the best because at the moment I have a webhotel at a hosting provider and I like that setup, setting up emails, and having more control I guess over my situation.
But is there any way I can use MongoDB on cPanel or direct admin except using MongoDB Atlas which costs a lot of money?
Because I have a setup using React, Node, Express, and MySQL and it works kind of well when working in the direct admin panel. But I just wanna make sure I make the right decision now when I start building an e-commerce website both to be cost effective and also not have to learn too many things.
I am also open to tips for example choosing Next.js instead etc if that is actually necessary and would help me in the long run.
I think you should use MySQL but with php or Python because e-commerce websites needs to be fast and reliable with more admin tools and you’ll find what you need and more in e-commerce when using php or python frameworks with MySQL database.
Example: Using django (python framework) with MySQL gives you administration dashboard that you can use to edit in a lot of things and django also supports a lot of things like generating ready forms linked to the models you generated
Why would you allow your decision to be driven by the limitations of a hosting account? MySQL is a relational database, and typically you need a solid understanding of relational database design and SQL. MongoDB as a so called "Document database" is not relational. You can associate several MongoDB collections together if you understand the basic concepts behind, it, but in general, MongoDB does not have nor require a fixed schema. It can do many of the things a relational database can do, particularly if your data fits nicely into a hierarchical structure. It also often appeals to people like yourself that are working with a javascript stack, as the interface to MongoDB is json. If you can install a package onto your host, then you should be able to use MongoDB. With that said, you can do all your development locally using Docker containers. I would not suggest that you let important design decisions be dictated by what one shared host allows you to do.