MongoDB takes a swing at PostgreSQL after claiming wins against rival
theregister.com
theregister.com
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.
But hey, SQLite is better than Mongo DB, at least. So we're making progress
Once someone couldn't scale (c2012) their MySQL. I recommend analyzing and working on the code. A competing consultant said Mongo. So, three years later they called me back to un-fuck that thing (that was only 3/4 done anyway) and then move everything to PG (and a fixed schema and some improved caching).
But are you saying Mongo specifically is the problem, or are you saying any non relational data store is the issue?
Anyway. I just use Postgres.
Same. Because I care about my data.
which I think gets little attention because people who use it see it as a secret weapon. Too bad about the license though. Also
and
[1] https://www.reddit.com/r/django/comments/14f68rz/postgresql_...
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.
We use a lot of them for things like "tags" (which can take freeform user- or ml- supplied image tags in key:value format). I adore it. (We tried mongo with one of our annotation systems and regretted it.) It's a very nice way to balance quick development (you don't need a schema change to try a feature for a while) with the benefits of a mostly schema-defined db.
Comparison - https://arangodb.com/subscriptions/
Weird choice. Doesn't give you much faith they have a lot of examples of companies migrating from Postgres.
It basically never makes sense to drive an application with MongoDB, which is why a lot of folks think it's strictly worse.
A perfect MongoDB (or any document db, really) use case has zero relationships. This is accomplished by duplicating data across documents where you would normally use a foreign key in an RDS. Naturally, this is anti-pattern for RDS-minded folks and everything you'd want to do with Mongo stems from this mode of thought (preprocessing/data replication instead of lookups).
Personally, I've had great success with Mongo and appreciate it for it's incredible depth in text searching via Atlas Search. Surprisingly, the web interface for Atlas in general is actually quite good and it's the only one I can bear to use; I usually can't stand them.
Mongodb certainly isn't doing it.
Their entire value proposition boils down to
create table docs (
doc jsonb
);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.
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
https://www.postgresql.org/docs/current/datatype-json.html
> JSON data is subject to the same concurrency-control considerations as any other data type when stored in a table. Although storing large documents is practicable, keep in mind that any update acquires a row-level lock on the whole row.
Concurrency is far more nuanced in MongoDB and storage of documents has far fewer side effects than jsonb.
The ad hominem is ironic with someone claiming RDBMS and key value stores are equivalent.
Is the concurrency "nuance" that Mongo DB allows 2 updates to a JSON doc to race with each other?
> keep in mind that any update acquires a row-level lock on the whole row.
Yes! Thank you Postgres developers. This is what _professionals_ do.
Professionals consider weigh the tradeoffs consistency vs partion tolerance, availability, synchronous vs asynchronous communication implications etc...
Nothing here is a silver bullet, it is about choosing the least worst option for a data domain.
We are in the cloud era, which is by its nature distributed.
The era of vertically scaled monoliths is mostly over for most people.
The book 'Software Architecture: The Hard Parts' is probably a path forward for you, but any books on modern data architecture would be.
Hint: even your ATM card doesn't use ACID, and many needs can improve performance, availability and resilience by not paying the cost of ACID transactions.
It is a far more complex subject than your posts suggest.
I'll send you some books to read, too.
> Hint: even your ATM card doesn't use ACID
I guarantee you that the actual database handling those ATM transactions is ACID-compliant. The banking institution itself couldn't even be certified by the FDIC or the Comptroller of the Currency (OCC) if their database system wasn't, at the very least, ACID compliant.
Out-of-band transaction resolution is a completely separate topic and has nothing to do with databases, or ACID, or anything else.
You're kinda out of your depth here...
Why's that?
NoSQL databases that store data as JSON documents, such as MongoDB and Couchbase, benefited from developer excitement over a denormalized data structures, a lower-level API, and horizontal scalability at the cost of ACID transactions. However, document stores “are on a collision course with RDBMSs,” the authors write, as they have adopted SQL and relational databases have added horizontal scalability and JSON support.
“Another wave of developers will claim that SQL and the RM are insufficient for emerging application domains,” they write. “People will then propose new query languages and data models to overcome these problems. There is tremendous value in exploring new ideas and concepts for DBMSs (it is where we get new features for SQL). The database research community and marketplace are more robust because of it. However, we do not expect these new data models to supplant the RM.”
[1] https://www.datanami.com/2024/07/08/dont-believe-the-big-dat... discussion: https://news.ycombinator.com/item?id=41406420
(https://news.ycombinator.com/item?id=1636198 linked to the original platform, which sadly shut down after a few years.)
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.
I don’t particularly hate or like any one database, but thinking about migrating the workloads that I have in mongo to Postgres just gives me no interest. Mongo solves the problems I have very well.
There's probably tons of small Mongo installations all over the internet doing great in their little niche. But the moment a project gets too big for Mongo, it becomes a problem very quickly. I suppose it's like comparing a bike to a car. If your problem is getting around a small town with nice weather, the bike wins. But the moment you need to move 5 people on the interstate to the next town in bad weather, there's no real choice besides the car.
That's been my experience with mongo every time