DEV Community

Discussion on: How I improved nested arrays performance in our MongoDB

Collapse
 
antmik profile image
Anton

Thanks for the feedback.

Yes, As I mentioned it will require three MySQL tables. Posts, genres, post-genre. Because it's a many-to-many relation. And imagine each post having tags, genres, etc. In MySQL I will have to create at least ten many-to-many tables to connect all subitems to posts.

Regarding your question. If I need to rewrite the project I still gonna choose MongoDB, because it's much comfortable to use on that complex objects I described.

However I would seek for some MongoDB plugin which will automate work with relations. Such as deleting and updating an item. So it will delete/update this item in all references, such as Posts. If I don't find this kind of plugin, I would consider wrting my own.

Collapse
 
mk48 profile image
Kumaran

thanks for the answer. I will give a try to MongoDB.