5
4 Comments

Why I Had to Migrate from MongoDB to PostgreSQL

submitted this link to Icon for group Developers
Developers
on July 19, 2021
  1. 7

    Yep, ever other time I post on here I suggest folks avoid nosql. If you really need unstructured data, just use the Postgres jsonb type - it's even better at JSON documents than Mongo claims to be.

    This leaves you with enough flexibility to outgrow the unstructured approach. And using Postgres with Hasura or Supabase makes relational databases really easy to approach for people more comfortable on the front end.

    https://hasura.io/blog/postgres-json-and-jsonb-type-support-on-graphql-41f586e47536/

  2. 2

    I wrote a while ago on the NoSQL craze and why most projects should use SQL as the main database and NoSQL as complementary storages for very specific tasks. I especially dislike document databases because nowadays, relational databases can work with JSON documents as well without losing the benefits of SQL (joins, foreign keys, constraints, etc). MongoDB still exists because it's easier to integrate natively with javascript projects for beginners, but that's it. For real-case workloads, SQL will work better in 100% of the cases.

    https://vladcalin.ro/blog/2021-06-26-whats-the-deal-with-nosql

  3. 1

    Yeah I 100% use Mongo like a relational db and I'm not proud of it. But I like Mongo only because of Atlas. I can spool up a database at the click of a button, and then easily browse the data from the website, plus it's free for most things I use it for. I haven't found anything as simple for Postgres.

  4. 1

    Hey thats a great blog post so insightful

Trending on Indie Hackers
I shipped a productivity SaaS in 30 days as a solo dev — here's what AI actually changed (and what it didn't) User Avatar 165 comments Never hire an SEO Agency for your Saas Startup User Avatar 101 comments A simple way to keep AI automations from making bad decisions User Avatar 67 comments Are indie makers actually bad customers? User Avatar 36 comments We automated our business vetting with OpenClaw User Avatar 35 comments I sent 10 cold DMs about failed Stripe payments. Here's what actually happened. User Avatar 33 comments