Live data from Hacker News

MongoDB takes a swing at PostgreSQL after claiming wins against rival

theregister.com

21–30 of 55 posts

Re: MongoDB takes a swing at PostgreSQL after claiming wins against rival

#21

I had such a bad experience with Mongo DB back in 2012-2013 that I don't think I'll ever use it again, or even really consider it. But maybe it's changed and gotten better since then? Anyway. I just use Postgres.

If you like the document db idea there are a lot of choices, especially https://arangodb.com/ which I think gets little attention because people who use it see it as a secret weapon. Too bad about the license though. Also https://couchdb.apache.org/ and https://developer.marklogic.com/

Also, Postgres. It has built in support for json data types, can index on json fields, and do most of the stuff you'd want to do in mongo while not locking you into that paradigm for the parts of your app that don't need it.

Re: MongoDB takes a swing at PostgreSQL after claiming wins against rival

#22
post #13

The quotes from the CEO are misleading, implying MongoDB is document-based and PostgreSQL is 100% relational. This is not true, PostgreSQL has had JSON support for quite some time.

Document-oriented databases are a subclass of the key-value store.

Postgres jason types are blobs in an RDBMS, and jsonb is to be avoided in almost all cases.

I am not a MongoDB cheerleader and I am a huge fan of Postgres when SQL is appropriate, but equating an ACID style DB with a key value store misses the point.

But it is horses for courses, people using MongoDB for acid transactions when support landed in v4 is where most of the problems came from.

When deployed in their core domains, both work better than the hacks implemented to artificially make them competitors.

Re: MongoDB takes a swing at PostgreSQL after claiming wins against rival

#23
post #20

Earlier quoted context omitted.

If you like the document db idea there are a lot of choices, especially https://arangodb.com/ which I think gets little attention because people who use it see it as a secret weapon. Too bad about the license though. Also https://couchdb.apache.org/ and https://developer.marklogic.com/

Isn't PostgreSQL supporting JSON and queries over them? [1] [1] https://www.reddit.com/r/django/comments/14f68rz/postgresql_...

It does. See https://www.postgresql.org/docs/current/datatype-json.html

I think it is ugly as hell to work w/ json documents in pgsql but most of the eng managers I’ve known think you couldn’t get fired for choosing pgsql.

Re: MongoDB takes a swing at PostgreSQL after claiming wins against rival

#24
post #22
post #13

The quotes from the CEO are misleading, implying MongoDB is document-based and PostgreSQL is 100% relational. This is not true, PostgreSQL has had JSON support for quite some time.

Document-oriented databases are a subclass of the key-value store. Postgres jason types are blobs in an RDBMS, and jsonb is to be avoided in almost all cases. I am not a MongoDB cheerleader and I am a huge fan of Postgres when SQL is appropriate, but equating an ACID style DB with a key value store misses the point. But it is horses for courses, people using MongoDB for acid transactions when support landed in v4 is…

> Postgres jason types are blobs in an RDBMS, and jsonb is to be avoided in almost all cases.

You might be uniformed (or misinformed) on this topic. JSONB is not just a "blob" in Postgres. It's a first-class value type with full query-ability and indexing support.

[0] https://www.postgresql.org/docs/current/functions-json.html

Re: MongoDB takes a swing at PostgreSQL after claiming wins against rival

#25
post #9

I was there in 2010s migrating Mongo databases chosen by "expert consultants" to Postgres and dealing with the fallout of massive tech debt those decisions usually caused. Won't get fooled again - no matter how many fluff articles they write you will sooner find me rotting in this barren earth than see me pick MongoDB for a new project.

Just checking you said migrating mongo to postgres. Did you mean the other way around? I still don't understand how mongo is still in business.

Are any of you guys old enough to remember when Marc Fleury got caught in an astroturfing scheme involving JBoss employees? That’s actually how I learned that word had been coined.

The MongoDB Team didn’t do exactly the same, or at least nobody caught them, but they did have a massive hype cycle, selling snake oil full of serious concurrency bugs. Managed to time their funding right so they ended up with enough money to buy a completely different NoSQL implementation, that actually did work (mostly), discontinued work on their code and relabeled the other implementation as Mongo.

I don’t patronize companies built on a bed of lies. Because how do you trust the lies stopped? They have a proven track record of being good at it. And you’re rewarding all of that behavior. The ends justify the means? Fuck that.

Re: MongoDB takes a swing at PostgreSQL after claiming wins against rival

#26
post #4

Earlier quoted context omitted.

/dev/null scales better than all of them

But is it web-scale?

"Mongo DB Is Web Scale" is pretty entertaining: https://www.youtube.com/watch?v=b2F-DItXtZs

(https://news.ycombinator.com/item?id=1636198 linked to the original platform, which sadly shut down after a few years.)

Re: MongoDB takes a swing at PostgreSQL after claiming wins against rival

#27
The main trouble I have with mongo or document databases in general is that using them effectively requires a lot of design thinking up front. You need to really understand your domain model, in a DDD sense. This isn't usually made clear to people.

Document databases are good for working with / storing aggregate root objects and related entities. If you don't know what that means, or are feeling your way through a new domain and aren't in a position to decide if you're really dealing with an aggregate root object or not, or think things might be subject to change later, put the tools down and go with something more conventional.

Additionally, if you do use mongo for your operational data store, you should probably consider combining it with read-projections in a relational style DB too, or at least more conventionally defined flattened collections in mongo, in order to service bulk read style queries. Aggregation queries in mongo can get out of control quickly if you're not careful. Much better to plan for that early. And if you end up separating concerns like that, you'll probably find yourself wondering why you didn't just go with Postgres from the start.

Re: MongoDB takes a swing at PostgreSQL after claiming wins against rival

#28
post #22
post #13

The quotes from the CEO are misleading, implying MongoDB is document-based and PostgreSQL is 100% relational. This is not true, PostgreSQL has had JSON support for quite some time.

Document-oriented databases are a subclass of the key-value store. Postgres jason types are blobs in an RDBMS, and jsonb is to be avoided in almost all cases. I am not a MongoDB cheerleader and I am a huge fan of Postgres when SQL is appropriate, but equating an ACID style DB with a key value store misses the point. But it is horses for courses, people using MongoDB for acid transactions when support landed in v4 is…

"jsonb is to be avoided in almost all cases"

Why's that?

Re: MongoDB takes a swing at PostgreSQL after claiming wins against rival

#29
post #22
post #13

The quotes from the CEO are misleading, implying MongoDB is document-based and PostgreSQL is 100% relational. This is not true, PostgreSQL has had JSON support for quite some time.

Document-oriented databases are a subclass of the key-value store. Postgres jason types are blobs in an RDBMS, and jsonb is to be avoided in almost all cases. I am not a MongoDB cheerleader and I am a huge fan of Postgres when SQL is appropriate, but equating an ACID style DB with a key value store misses the point. But it is horses for courses, people using MongoDB for acid transactions when support landed in v4 is…

A key/value store is easy to build in Postgres, just define a table with a key column and a value column, that's it. Given that both key and value can be of datatype JsonB or BLOB, there's no restriction in generality, just, you know, aptness for the purpose. Now if you do that, you can—in Postgres—define additional structure or choose a different model entirely if your KV store turns out to be less ideal for whatever you want to do. MongoDB does not give you that choice.

Re: MongoDB takes a swing at PostgreSQL after claiming wins against rival

#30
post #25

Earlier quoted context omitted.

Just checking you said migrating mongo to postgres. Did you mean the other way around? I still don't understand how mongo is still in business.

Are any of you guys old enough to remember when Marc Fleury got caught in an astroturfing scheme involving JBoss employees? That’s actually how I learned that word had been coined. The MongoDB Team didn’t do exactly the same, or at least nobody caught them, but they did have a massive hype cycle, selling snake oil full of serious concurrency bugs. Managed to time their funding right so they ended up with enough money…

I suspect a good amount of the hype around NoSQL was driven by frontend developers transitioning into backend work via Node, and Mongo being relatively simple to get started on compared to relational databases. And that culture seems to have stuck. To this day, many popular backend js frameworks either completely ignore relational data storage or slap some bare bones interface over it.
Post reply on HN