Earlier quoted context omitted.
I've nothing against Postgres but MySQL is a wonderful option that is likely still in far higher and heavier use, when considering open source databases.
I think it gained popularity over a decade ago, when it was faster because it was unsafe. In the end postgres is the better one. With mysql the defaults are bad.
The Great Migration from MongoDB to PostgreSQL
221–230 of 339 posts
Re: The Great Migration from MongoDB to PostgreSQL
#222The irony of it all is that MongoDB actually matured and you do not have to jump through hoops to have, say, transactions. I am ALL for Postgres, I even wrote a post about the importance of being fluent in relational databases: https://renegadeotter.com/2023/11/12/your-database-skills-ar... What grinds my gears is the whiplash caused by this frantic stampede from one hype to the next. I am just waiting for the AI hyp…
> The irony of it all is that MongoDB actually matured and you do not have to jump through hoops to have, say, transactions. Are transactions still limited to a single document in Mongo?
Re: The Great Migration from MongoDB to PostgreSQL
#223Earlier quoted context omitted.
I recall when my team chose MongoDB ~2011, Postgres & friends didn't have JSON columns, so there was a lot of extra data modelling that probably was unnecessary. The biggest use case for MongoDB was for huMongous data. Obvs MongoDB was a good fit, because of the name.
I still didn't have a single use-case to use JSON columns yet. Sometimes I feel that JSON columns are made for people who don't want to properly design their domain model. Big mistake.
In other words that you don't see a use case for JSON columns because you don't think it's good DB design.
I know I have used them after decades of RDBMS work, and it feels like I'm "cheating" a bit. But they really do make sense for some use cases that can be harder to achieve with traditionally normalized RDBMS alone. For instance, for configuration options or scenarios where different objects may have a few different attributes, but are largely the same.
If you've ever used an entity-attribute-value data model or otherwise ended up with table proliferation or a bunch of nullable columns to accommodate the latter use case, you might appreciate the simplification JSON columns offer.
Re: The Great Migration from MongoDB to PostgreSQL
#224Earlier quoted context omitted.
Applications that are essentially form wizards are a great fit for a document database. Think application forms etc.
Is there a benefit of Mongo for that over just Postgres with JSONB columns? You're still storing JSON in Postgres but you'd get the relational aspects too for things like users having many forms, billing and account relationships etc.
Re: The Great Migration from MongoDB to PostgreSQL
#225Earlier quoted context omitted.
He's always been fundamentally a zealot who sees most narratives in black and white terms. It's an extremely unfortunate characteristic of a software engineer. It's the same reason he's so pro Trump I think.
I didn't even know about that; I checked his Twitter, and first thing is a reply to the Baltimore bridge collapse: > Doors and wheels fall off airplanes. Hundreds of illegal immigrants assault and overrun border guards in Texas. We can’t even muster support for our allies in the security council. But at least our pronouns are in order. https://twitter.com/unclebobmartin/status/177262869295654553... You really need to…
Pure evil, as Trump would call it.
Re: The Great Migration from MongoDB to PostgreSQL
#226I use MySQL for everything - always have. Can someone hit me with a few reasons why you would use Postgres over MySQL? I don’t have any familial affinity to any database, but I’m not sure what the benefits to Postgres are relative to MySQL.
Re: The Great Migration from MongoDB to PostgreSQL
#227Ah, the old "I used a wrong product for my problem and now I complain the product is bad because it does not suit my case." defence. MongoDB is a document database. It is not supposed to be good at relations. Also lacking support with cloud providers and lacking experience with MongoDB is not MongoDB's problem, it is your poor decisionmaking. If you value those things, you should have taken it into account when you w…
Re: The Great Migration from MongoDB to PostgreSQL
#228The irony of it all is that MongoDB actually matured and you do not have to jump through hoops to have, say, transactions. I am ALL for Postgres, I even wrote a post about the importance of being fluent in relational databases: https://renegadeotter.com/2023/11/12/your-database-skills-ar... What grinds my gears is the whiplash caused by this frantic stampede from one hype to the next. I am just waiting for the AI hyp…
Re: The Great Migration from MongoDB to PostgreSQL
#229The one unsolicited piece of tech advice I always give is “Just use Postgres”. Postgres Is Enough: https://gist.github.com/cpursley/c8fb81fe8a7e5df038158bdfe0f... There’s some Mongo/json alternatives in the list if you really need unstructured data. And there’s a huge plug-in ecosystem as well for just about anything you could imagine.
Re: The Great Migration from MongoDB to PostgreSQL
#230Earlier quoted context omitted.
Applications that are essentially form wizards are a great fit for a document database. Think application forms etc.
Is there a benefit of Mongo for that over just Postgres with JSONB columns? You're still storing JSON in Postgres but you'd get the relational aspects too for things like users having many forms, billing and account relationships etc.
Some people do like the MongoDB API, however.