
Ask HN: When would you use MongoDB? - spiffytech
Is there ever a time you would choose it over e.g., Postgres?
======
justaaron
Mongo itself, per-se? Never. (single write master = scaling bottleneck)

A document database? Whenever I wanted to lump certain "tables" worth of data
together literally ALWAYS (as in modeling many real-world entities) in my CRUD
operations. Literally the opposite use case of what the person below me
outlined with "whenever the data structure may change too frequently" as I see
relational-dbs directly applicable to aggregations (data analysis/metrics) and
frequently-changing amorphous data structures in which various concretely and
atomically known entities have their interactions and composition fleshed-out.

When you need to take that and run and run hard, documents make sense, then
you can look at turning that into primitives (key:value mapping like ohm...?)

Incidentally, there are decent commercial MongoDB SAAS vendors, but running
your own replica-set is somewhat cumbersome, and I've personally experienced
data-loss suddenly on a self-hosted system after 1 year of flawless operation
and 5 nines of uptime...

------
billconan
I like mongodb's programming interface (c++). I'm afraid of sql injection.

Also when prototyping, I don't have a full design of the database structure.
things change too frequently.

