Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I ran into this same nasty surprise building a prototype to store requests in Mongo instead of Postgres. It was enough to scare me away, too. Glad I noticed it while it was still just a script+Makefile simulation.

Another problem with Mongo I never heard anyone else raise is that there are no namespaces. If I install Mongo, all the tables/collections live in the same namespace. What if I want to use it for multiple projects? How do other people solve this problem?



You have multiple databases, just like a sql solution. One database per project.


Can you elaborate please? With a Postgres/MySQL/Oracle installation I can say `CREATE DATABASE` and get a new namespace. I couldn't find anything like that with Mongo. Am I just missing something?


"use foobar" creates a new database called foobar.


Ah, somewhere along the line I got the impression that in Mongo a "database" and a "collection" were the same thing, but that's not true. Glad to know this was just my mistake!


Nope. Collections are analogous to tables, and documents to rows.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: