4

I understand the difference between embedded and referenced relationships in mongodb. By why do you need them in the first place?

3 Answers 3

5

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.

1

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

MongoDB Schema Design - Many small documents or fewer large documents?

mongodb schema design for blogs

0
1

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.

http://mongly.com/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.