Hacker News new | past | comments | ask | show | jobs | submit login
Everyone knows that you can have relations in MongoDB, right?
1 point by dr_dimitru 8 months ago | hide | past | favorite | 3 comments
Relations are just `_id` of other objects from the same or another collection. It's just objects instead of tables. It's like a table with different columns on each row and nested tables. In production, most records/objects are just like tables. Unique "denormalization" in MongoDB is used only where it can serve the purpose of implementing unique task



Are they actual relations, or is it just storing a value that happens to be the same alphanumeric string as another object's ID?


@pavel_lishin yes! It's just storing a value that is alphanumeric string of another object's _id


or `Object` class instance with built-in additional details like timestamp




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

Search: