4 ms·
MongoDB is not the same as Postgres and jsonb. also, I'd challenge your thinking - ultimately the goal is to solve problems. you don't necessarily need SQL, or
by amazingamazing 2y ago
MongoDB is not the same as Postgres and jsonb.
also, I'd challenge your thinking - ultimately the goal is to solve problems. you don't necessarily need SQL, or relations for that matter. that being said, naively modeling your stuff in mongodb (or other things like dynamodb) will cause you severe pain...
what's also true, which people forget, is naively modeling your stuff with a relational database will also cause you pain. as they sometimes say, normalize until it hurts, and then denormalize to scale and make it work
the amount of places I've seen that skip the second part and have extremely normalized databases makes me cringe. it's like people think joins are free...
- pphysch 2y agoThen your implementation can be as simple as CREATE TABLE documents (content JSONB);. But I suspect a PK and some metadata columns like timestamps will come in handy.
- amazingamazing 2y agosigh - mongoDB is not the same as creating a table with jsonb. for one, you don't have to deal with handling connections. that being said, postgres is great, but it's not the same.
- pphysch 2y agoPostgres has ways to simplify connection management, if that is a blocker for you (pooling, pgbouncer, postgrest, etc)