DEV Community

Discussion on: What database should I use?

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

BTW, I don't really understand why database choice matters, unless you aim for specific features.

Yes, you can put normalized data in MongoDB, and denormalized in Postgres.

But MongoDB supports deep JSON indexing and Array indexing, as well as compound indexes. Not sure about any traditional RDBMS.

Collapse
 
tajeddine profile image
Tajeddine Alaoui

I think devs underestimate the power of Mongo, If you aren't planning to make a db model that rely on huge amount of joins then Mongo is the best choice.

Collapse
 
leob profile image
leob • Edited

Whether Mongo is the best choice or not totally depends on your use case - what does your app do ... without knowing the use case it's impossible to say if Mongo is the best choice. In my experience, in most cases it isn't, but for a certain class of cases it might be. So the answer is "it depends". But well, "huge amount of joins" - even when your data model has just a dozen joins/relations then an RDBMS may already have the edge, from an ease of use point of view.

Collapse
 
leob profile image
leob

MySQL does support JSON lookups and indexes. Never used it, but I've heard that it's there.