Is it possible to have relation between object in a MongoDB database?

Viewed 11732

I am using MongoDB at work these days. So far, I find it a great experience.

However I am asked to make relations between collections with MongoDB. This goes against the purpose of the NoSQL concept to me but being a good old noob in this area, I came to ask for other opinions.

For example if we take the common Role / User relationship, is it possible to have a reference collection named "Roles" and to attribute a reference of one item to a User item?

I started thinking about creating an object which provides an ID to the object requested but it feels like something I should not have to do with NoSQL.

So are there people here who have been ask to do the same thing? Did you succeed and how?

2 Answers
Related