say
say

Reputation: 2655

Why use relations in Mongodb?

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

Answers (3)

DoodleWalker
DoodleWalker

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.

http://mongly.com/

Upvotes: 1

user2665694
user2665694

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

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

mongodb schema design for blogs

Upvotes: 1

Ian Mercer
Ian Mercer

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

Related Questions