News for hackers. Stuff that matters.
Re:The Great Migration from MongoDB to PostgreSQL by tgv on Friday March 29, 2024 @05:23AM (#39862076)
Document databases aren't an inherently bad idea. They have their uses. I'm using mongodb because it fits my use case: the app is very front-end oriented, and the data the user needs on a specific page fits neatly in one document. There are (quite a lot) related documents, but they are only needed in specific parts of the app, and that's when those are retrieved. Pretty simple.

I could argue that in-server SQLite is a bad idea: if you ever need to share the database or distribute tasks, you're fucked. But for some use cases it just works.

"The world" hasn't realized shit. It jumps from fad to fad, fueled by hyped promises and lack of experience.

Re:The Great Migration from MongoDB to PostgreSQL by eddd-ddde on Friday March 29, 2024 @10:06AM (#39864279)
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?

Re:The Great Migration from MongoDB to PostgreSQL by tgv on Friday March 29, 2024 @11:19AM (#39865122)
What benefit does switching to postgresql bring? When mongodb stops being maintained, I'll consider postgres, but until then, I now only see downsides.
Re:The Great Migration from MongoDB to PostgreSQL by eddd-ddde on Friday March 29, 2024 @12:39PM (#39866059)
Lot's of useful features?

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.