Reputation: 2655
I understand the difference between embedded and referenced relationships in mongodb. By why do you need them in the first place?
Upvotes: 4
Views: 1835
Reputation: 289
As well as the 10gen resources this is a really great intro to MongoDB, the little MongoDB book is an excellent & quick read along with the interactive guides.
Upvotes: 1
Reputation:
This question is really being asked ten times a day on IRC and various mailing lists. It's documented in depth on the MongoDB site (see above), various blog postings and talks and presentations. Basic research appreciated.
http://www.10gen.com/presentations
In addition: various SO postings deal with that:
MongoDB Schema Design - New Collection or Reference?
MongoDB Schema Design - Many small documents or fewer large documents?
mongodb schema design for blogs
Upvotes: 1
Reputation: 39277
MongoDB documentation has a section on this including a discussion on "why would I not want to embed this object?"
http://www.mongodb.org/display/DOCS/Schema+Design
Sometimes it's a question of the maintenance effort required to embed copies in each document, sometimes it's simply impossible to embed because of the limits on document sizes.
Upvotes: 5