Sometimes, there is no substitute for a genuine multi-document relationship in your models. The main method for accomplishing this in MongoDB is through objectId references. These allow for implementation of one-to-one, one-to-many, and many-to-many relationships through reference IDs in models. This type of relationship is very common in web applications. Consider, for instance, our blog post and user relationship. While we could embed the user as a sub-document, if the user ever changes their name, our blog post would still show the name they had when they originally authored the blog post. A true relationship is the best way to model these separate documents.
Germany
Slovakia
Canada
Brazil
Singapore
Hungary
Philippines
Mexico
Thailand
Ukraine
Luxembourg
Estonia
Lithuania
Norway
Chile
United States
Great Britain
India
Spain
South Korea
Ecuador
Colombia
Taiwan
Switzerland
Indonesia
Cyprus
Denmark
Finland
Poland
Malta
Czechia
New Zealand
Austria
Turkey
France
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Malaysia
South Africa
Netherlands
Bulgaria
Latvia
Australia
Japan
Russia