4 ms·
We're seeing a convergence of document DBs adding relational features, and relational DBs adding document features. At this point I find the best of both worlds
by VWWHFSfQ 1y ago
We're seeing a convergence of document DBs adding relational features, and relational DBs adding document features. At this point I find the best of both worlds to simply be PG with JSONB.
create table document (
id uuid primary key default gen_random_uuid(),
doc jsonb
);
This alone will give you a huge number of the features that Mongo provides, but also the full power of Postgres for everything else.
- victor106 1y agothis makes so much sense. I also wonder if there are some specific capabilities of MongoDB that this pattern does not support?
- etse 1y agoMaybe not capabilities, but I'm wondering if Postgres has gotten any easier to scale horizontally. The administrative overhead of scaling and maintenance with MongoDB seemed lower to Postgres to me. Would love to hear from others with more Postgres than I.
- ttfkam 1y agoExcluding conversations about MongoDB compatibility, PG16 added bidirectional replication for multiple writers and there are Postgres-compatible options out there for a distributed database including Citus, EDB Postgres Distributed, Yugabyte, CockroachDB, Aurora Limitless, etc. The choices require some nuance to figure out a best fit, but then again so does any MongoDB installation (despite the marketing hype to the contrary as there are no free lunches). You might be surprised how far most folks can typically scale with just read replica(s) on a reasonably sized writer. Add in bidirectional replication for multiple writers, and you can go even further. Beyond that, even vanilla Postgres can do it, but you'll need to do some combinations of partitioning and foreign tables.