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
This Week in AI: The Gap Is Getting Clearer User Avatar 45 comments 1 small portfolio change got me 10x more impressions User Avatar 28 comments AI Is Destroying the Traditional Music Business and Here’s Why. User Avatar 22 comments A Tiny Side Project That Just Crossed 100 Users — And Somehow Feels Even More Real Now User Avatar 13 comments From 1k to 12k visits: all it took was one move. User Avatar 11 comments Tell me what your business does, I’ll show you the growth loops you’re probably missing. User Avatar 10 comments