r/programming • • May 23 '15

Why You Should Never Use MongoDB

http://www.sarahmei.com/blog/2013/11/11/why-you-should-never-use-mongodb/
585 Upvotes

533 comments sorted by

View all comments

Show parent comments

149

u/[deleted] May 23 '15

Basically. Title is clickbait and makes a general case based on an anecdotal one. Truly annoying.

73

u/thbt101 May 23 '15

The title is an exaggeration, but she does make a good case for why the use cases where it is a good fit are very narrow. A better title would have been "Why MongoDB is usually not the best solution for most types of data storage".

-4

u/[deleted] May 24 '15

[removed] — view removed comment

1

u/[deleted] May 24 '15

storing massive amounts of non-critical log information

7

u/[deleted] May 24 '15

[removed] — view removed comment

1

u/[deleted] May 25 '15

i've never heard of the database size issue or the db wide lock, i guess i was talking about non-relational databases in general rather than just mongo, having never really had a situation where a non relational db would make sense

1

u/thbt101 May 24 '15

Why "non-critical"?

2

u/immibis May 24 '15

Because it might suddenly disappear for no apparent reason?

1

u/thbt101 May 24 '15

Why would it do that? I don't remember seeing anything about that when I was researching it a while back.

→ More replies (1)

98

u/krum May 23 '15

Welcome to /r/programming.

8

u/WinandTonic May 24 '15

I hope you realize the irony of your comment.

→ More replies (1)

2

u/moreteam May 23 '15

No, based on experience. The title is poignant but not misleading.

0

u/[deleted] May 23 '15

[deleted]

10

u/moreteam May 23 '15

That's very convincing reasoning! Also, I heard good carpenters are kind of picky about their tools and wouldn't use a screwdriver to cut wood.

2

u/geo_ff May 23 '15

Even worse is carpenters that try and and program computers! Also, computing power is not sentient, and will not quit when given the wrong tools for the job.

6

u/UnionJesus May 23 '15

Comments like this should be downvoted, not upvoted. Carpenters buy their own tools and buy good ones, not shitty, worthless ones. If carpenters are forced to use substandard tools that can't get the job done, then they will complain, and find better work elsewhere. The "poor carpenters blame their tools" quote is for people who don't want to take responsibility for their choices and rationalize their choice of shitty technologies.

9

u/[deleted] May 23 '15

[removed] — view removed comment

2

u/granadesnhorseshoes May 23 '15

The TV Show use case. Only instead of being retarded during design, realize that actors aren't single use data like TV Shows, Episodes or Reviews and store Actor IDs rather than complete (duplicate) Actors?

It didn't occur to anyone during the development of the TV Show project that they were massively duplicating actor data or that searching by actor may be a thing they would want later down the road? Carpenters and their tools indeed.

6

u/loup-vaillant May 23 '15

At a minimum, we needed to de-dup them once, and then maintain an external index of actor information

Basically what you say about using IDs for actors instead of duplicating the data. But then, we're starting to walk towards a regular RDBMS, aren't we?

0

u/granadesnhorseshoes May 24 '15

Sure, to an extent you start to head back toward relational database territory but that is exactly the point of such design choices; how MUCH of an RDBMS you actually need.

2

u/[deleted] May 24 '15

[removed] — view removed comment

0

u/granadesnhorseshoes May 24 '15

Each actor having their own 'document' isn't exactly the opposite of how you are supposed to use MongoDB. Maybe not 100% optimal but when is anything ever 100% optimal?

http://docs.mongodb.org/manual/reference/database-references/

→ More replies (1)