Hello Everyone,
I hope you all doing well.
We are working on a project combination of E Commerce + Social. so its basically Social business community where people can socialize like facebook, twitter, etc and can open store like multivendor options for example Alibaba.com amazon.com etc, and people sale their home items like classified products. here we have included all the categories for for sale and purchase. here 3rd party companies will also work as a partner for their business sale , purchase and advertisement. we will have our own Blog and Forum discussion pages within this platform.
We are working on MEAN technology, but I come to know that there are some limitations in MongoDB or have crash problems like financial transaction work. I have read old comments and reviews on mongodb regarding this issue, I want to know whats the current situation regarding these issues? which one is the best option according to above requirements. MongoDB or MySQL?
Many thanks in advance for your answers.
regards
Faisal
Gijo Varghese
A WordPress speed enthusiast
I recommend the combination of two. Just consider what type of data you should store at what DB.
I'd like to add couple of things to Bryan's answer.
Limitations of each DB in comparison to other:
If you notice the pattern above you'd figure that
In MongoDB: Keep your frequent reads. Dump the unknown. Store the nested data for which the nested content's scope is isolated to its root parent (mongo document) but not outside. Keep the computed snapshots.
In MySQL: Anything that's Relational across entities. Anything that is Transactional goes here, you cannot mess with it without rollbacks.
Having said that above, both DBs are capable of handling their limitations with some workarounds although those are not recommended.
While checking the replies below, I realized that my "opinion" on this is already covered by multiple posts.
Best Wishes.
Instead of MySQL and MongoDB, I would suggest you PostgreSQL!
Why?
Consider the scenario. You need to save the list of products you have. In MySQL (or any other relational DB) you can create a table named 'products' then add columns like id, name, desc, price, type, quantity etc. Relational DBs works great for these situations. But what if you need to save the 'specification' of each product. Its config will be different for each product. In such cases, MongoDB would be better because you can save them as a JSON.
In Postgres, you can do both!
Postgres have support for
JSONBdata type which allows you to save 'specification' or any other similar JSON as a column. Later you can query the data inside JSON just like you do with Mongo. (MySQL have support for JSON but they save it as text, useless)Here is a link to JSON in Postgres: blog.codeship.com/unleash-the-power-of-storing-js…