Live data from Hacker News

Why everyone hates MongoDB

gustavoveloso.posterous.com

11–20 of 53 posts

Re: Why everyone hates MongoDB

#11

It's cool to hate MongoDB, it used to be really cool to like MongoDB. Same thing happend with MySQL probably 10 years ago. I have built some apps with Mongo and it's fine as long as you don't expect it to be a SQL database. A lot of times I wish it had features x,y,z from sql land, and other times I wish MySQL was schemaless. Nowadays, I have begun to defer my database choice until I absolutely have to put an app int…

It's cool to hate MongoDB When a product is pushed as essentially a silver-bullet -- often by people who have never and will never actually build anything with it -- it is naturally going to get a lot of backlash by people who see through the problems, and moreso by those who buy the hype and then smash into the reality halfway through their projects. I speak from personal experience on the first point, while the sec…

Then that's obviously a problem with the people touting MongoDB. It's not an inherent fault in the actual software itself...

Re: Why everyone hates MongoDB

#12
I've made a transcription of the famous 'MongoDB is web scale' video, a humorous conversation between a NoSQL fanboy and a more cautious, conventional database developer:

"'And in conclusion, we have found MySQL to be an excellent database for our website. Any questions?'

Yes, I have a question. Why didn't you use MongoDB? MongoDB is a web scale database, and doesn't use SQL or JOINs, so it's high-performance. ...."

Read the entire conversation at http://www.mongodb-is-web-scale.com/

Re: Why everyone hates MongoDB

#14
I wonder if the ease of use of MongoDB might be part of why this "hating on mongo" trend exists -- it's very easy to setup and use without having to think through exactly what the best way to use it is. Which means it's very easy to do something dumb without realizing you're doing something dumb. The problem is, most of these database anti-patterns aren't visible at a small-scale, they only become obvious once the datasets get large and then it's really hard to change things.

Pretty much any database is going to leak abstractions at some point, there's absolutely no way of getting around understanding how your DB works. I think the problem with Mongo is that it's so developer friendly initially, that it makes it easy to avoid a lot of hard decisions that will eventually have to be made, and when those decisions do come to the forefront, it's often at a much less convenient juncture in the application's lifecycle to change things.

Re: Why everyone hates MongoDB

#15
post #7

Because it's not a particularly good database, but it's being marketed strongly. There are better (more mature, easier to maintain, faster, etc.) alternatives for both single-machine (Postgres, MySQL) and distributed (Cassandra, HBase) usage. It's a pain to take care of, it does table scans all the time (partly because it has no schema, partly because of design issues), it has pretty poor profiling tools. It's almost…

It's easy to jump in, and able to provide decent environment for developers. I believe that's similar to early MySQL, you know with only MyISAM tables, where there was no transaction support or referential integrity and your data was open to all kinds of corruption issues. It was easy to use, was installed almost everywhere and there were great tools around it. It has grown to be a pretty decent RDBMS. Mongo has the…

[deleted]

Re: Why everyone hates MongoDB

#16
post #7

Earlier quoted context omitted.

It's easy to jump in, and able to provide decent environment for developers. I believe that's similar to early MySQL, you know with only MyISAM tables, where there was no transaction support or referential integrity and your data was open to all kinds of corruption issues. It was easy to use, was installed almost everywhere and there were great tools around it. It has grown to be a pretty decent RDBMS. Mongo has the…

But why wait, when you can use Postgres now?

I'm not saying that I would not use Postgres now. Actually, I've been running a website on MongoDB for over a year now. I don't remember the reason behind it but it haven't caused any problems so far. The web server handles more than a million page views per day and all data is stored on MongoDB. I'm not perfectly happy with it but it does what it's supposed to. With some gimmicks here and there. If I started from scratch today, I'd probably go with PostgreSQL. Not because MongoDB is "bad" but because it's data model itself causes some problems. For example, if you query some range on an index with upper and lower bounds (like age > 18 && age < 50) it can not use both bounds on the index. That's been driving me crazy on some queries and I had to use hacky indexes. It's not a bug though, it's the query syntax and data model causing these kind of behaviour. There have been similar examples during this last year but not something that would cause "hate" agains it. On the plus side, it makes prototyping stuff so pleasantly easy that you can not have that on PostgreSQL.

Re: Why everyone hates MongoDB

#17

Earlier quoted context omitted.

It's cool to hate MongoDB When a product is pushed as essentially a silver-bullet -- often by people who have never and will never actually build anything with it -- it is naturally going to get a lot of backlash by people who see through the problems, and moreso by those who buy the hype and then smash into the reality halfway through their projects. I speak from personal experience on the first point, while the sec…

Then that's obviously a problem with the people touting MongoDB. It's not an inherent fault in the actual software itself...

Absolutely and unequivocally true! And the truth is that the actual makers have always been quite reasonable in their claims. But from an industry perspective it is hard to separate the two, much like Visual Basic got most of its bad rap from the people who used Visual Basic than from the platform itself.

Re: Why everyone hates MongoDB

#18

I wonder if the ease of use of MongoDB might be part of why this "hating on mongo" trend exists -- it's very easy to setup and use without having to think through exactly what the best way to use it is. Which means it's very easy to do something dumb without realizing you're doing something dumb. The problem is, most of these database anti-patterns aren't visible at a small-scale, they only become obvious once the da…

I heard its going to be bundled with the next Flash IDE and support Actionscript for querying.

Re: Why everyone hates MongoDB

#19

It's cool to hate MongoDB, it used to be really cool to like MongoDB. Same thing happend with MySQL probably 10 years ago. I have built some apps with Mongo and it's fine as long as you don't expect it to be a SQL database. A lot of times I wish it had features x,y,z from sql land, and other times I wish MySQL was schemaless. Nowadays, I have begun to defer my database choice until I absolutely have to put an app int…

Where do you work? Sounds pretty chill.

Re: Why everyone hates MongoDB

#20
post #16

Earlier quoted context omitted.

But why wait, when you can use Postgres now?

I'm not saying that I would not use Postgres now. Actually, I've been running a website on MongoDB for over a year now. I don't remember the reason behind it but it haven't caused any problems so far. The web server handles more than a million page views per day and all data is stored on MongoDB. I'm not perfectly happy with it but it does what it's supposed to. With some gimmicks here and there. If I started from sc…

I consider it a design flaw that queries can only use one index. In fact, many queries can never use any index (I had to write a query optimiser because mongo doesn't bother). Actually some queries do use more than one index (top-level $or), but it's actually more annoying than useful.

I find especially during prototyping having a clear data model is great. SQLAlchemy + Postgres, then later on Alembic for migrations is so much more pleasant, predictable and performant.

Post reply on HN