4 ms·
Everyone knows that you can have relations in MongoDB, right?
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
- pavel_lishin 2y agoAre they actual relations, or is it just storing a value that happens to be the same alphanumeric string as another object's ID?
- dr_dimitru 2y ago@pavel_lishin yes! It's just storing a value that is alphanumeric string of another object's _id
- dr_dimitru 2y agoor `Object` class instance with built-in additional details like timestamp