Earlier 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.
Yes, I think it's reasonable to say the NoSQL community drove the JSON columns in the relational databases. And while the JSON-ness of said columns is not necessarily the relevant bit to me, having the escape hatch of being able to just sort of splat out a "other" column has been something I've used several times, and it has relieved some non-trivial stress and strain in relational designs in my opinion. It's not eve…
The Great Migration from MongoDB to PostgreSQL
211–220 of 339 posts
Re: The Great Migration from MongoDB to PostgreSQL
#212Earlier 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.
Re: The Great Migration from MongoDB to PostgreSQL
#213Earlier quoted context omitted.
I am curious on this. Why do you think SQLite is simpler than Postgres? and in what setting is that the case? Sqlite comes with the headache of managing an attached volume.
Building an mvp or a single container app. I’m actually trying to get Postgres to work like this right now. SQLite being embedded is simpler to use and more performant in this environment as there is no IPC overhead.
Re: The Great Migration from MongoDB to PostgreSQL
#214Ah, 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…
That perspective doesn't work well for database products, in my opinion. There is a huge pressure for databases to evolve with your business and applications and to adapt to whatever your throw at it.
Swapping out a database product is less like changing tools and more like changing a foundation. You can't do it every time a new problem arises.
That's not to say you can't use a few different products if that makes sense. But that has its complications.
Re: The Great Migration from MongoDB to PostgreSQL
#215Earlier quoted context omitted.
What about a Postgres database where you store your documents in a key value table of json objects? What mongodb benefits would you be missing?
What benefit does switching to postgresql bring? When mongodb stops being maintained, I'll consider postgres, but until then, I now only see downsides.
You can join data when needed, proper transactions, schemas where you need schemas.
For example you start with a basic (key, json) table. Once you begin to stabilise your schema, add columns generated from your json objects, now you can get proper joins, indexes, validations, on said columns.
Re: The Great Migration from MongoDB to PostgreSQL
#216Earlier quoted context omitted.
So what is a good use case for Mongodb? I have never seen an application where a "document database" would have been a good choice. In every project where I have seen Mongodb, it has turned out to be the wrong choice. Even for prototyping there are many other good choices since RDBMS like Postgres have implemented JSON support. Mongodb looks like a solution in search of a problem.
Applications that are essentially form wizards are a great fit for a document database. Think application forms etc.
Re: The Great Migration from MongoDB to PostgreSQL
#217Earlier 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.
In my mind, MySQL no longer exists. It’s a weird Oracle thing that I wouldn’t touch with a lineman’s pole. MariaDB is what happened after MySQL disappeared.
Re: The Great Migration from MongoDB to PostgreSQL
#218Earlier quoted context omitted.
Not sure on that, it made some of the SQL solutions innovate quite a bit.
What did relational databases need from all the document DBs du jour? Broken transactions? Lack of ACID guarantees? Devil-may-care schemas?
Re: The Great Migration from MongoDB to PostgreSQL
#219Earlier 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 wrote this in another comment, but it's relevant here I think: " I do scaling and performance work, mostly with Rails apps, but a significant amount of the work is database level and not language specific. I've used both postgres and MySQL (and a few other databases) going back to 2000. The best thing I can hear from a company when I start is "We use Postgres". If they're using postgres then I know there's likely a…
Re: The Great Migration from MongoDB to PostgreSQL
#220Ah, 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…
So it became one of those software dogma things and I remember having "debates" right here on HN, including around the necessity of transactions.
So it's kind of ironic to see people now chastising those who fell prey to the dogma. Full circle.