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
30 days ago I posted here with $0 revenue. Here's what actually happened next. User Avatar 148 comments I used $30,983 of AI tokens last month in Claude code on $200/mo plan User Avatar 90 comments my reddit post got 600K+ views. here's exactly what i did User Avatar 58 comments How to spot high-intent customers in 5 minutes, for free. User Avatar 44 comments Fixing broken scrapers instead of working on my actual product. So I made it my problem. User Avatar 38 comments I Built a Habit Tracker SaaS Alone in 6 Weeks (No CS Degree, No Team). Here's Exactly How User Avatar 38 comments