| ▲ | giancarlostoro 4 hours ago | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
MongoDB is not a bad database, it is not my first immediate choice for everything, but it is very easy to get into, super easy to prototype with. My biggest pet peeve is how it handled indexes, shoves it all into memory. That and how people use it sometimes bewilders me. Two fun facts: ObjectID's are like Discord snowflakes: you can get a timestamp of when they were generated, you can also generate them client side, so you can filter items in a collection by when they were created. The other one, that I always enjoyed is, you can take an existing ObjectId, and reinsert it into another document, you dont have to nest all your data, you can go kinda sorta relational about it. Used it at a previous job, the first project could have just used a SQL db but because the person who made the intial one tried to do NoSQL using something in the cloud, they migrated it to MongoDB to keep it simple and consistent. The second project, well, we really discovered all the limits if you aren't Google with unlimited server memory available, like indexing as I mentioned. MongoDB pipelines are probably my favorite feature on the other hand. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | lukaszkorecki 3 hours ago | parent [-] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
> you can go kinda sorta relational about it. and reinvent half of a SQL engine inside your backend logic, badly. (source: for the 3rd time, I'm working on a system that uses Mongo extensively, the goal is to move to Postgres as soon as that's viable) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||