MongoDB architectural question

Posted by pex on Stack Overflow See other posts from Stack Overflow or by pex
Published on 2010-03-11T17:22:55Z Indexed on 2010/03/11 17:24 UTC
Read the original article Hit count: 392

I have to store 4 Models. Let's say a Post that has many and belongs to many Categories. Category on the other hand has many Qualities. At the moment I'm of the opinion, that Post and Categories are Documents. Qualities becomes an EmbeddedDocument of Categories.

We're coming to the root problem: There are a lot of Votes on Qualities that belong to a Post. I thought about embed Votes in Post and give it a quality_id.

I am really expecting a lot of Votes and there has to be a possibility to filter them (e.g by Username / Usergroup / Date voted). I worked with MongoMapper and I think the missing existence of find methods for EmbeddedDocuments could become a killer. On the other hand I'm wondering about performance issues. What if I want to provide a Post without all the Votes, but only a few.

Or, what if I define an own Document for Votes and have tons of Vote-Documents? Wouldn't that become a performance killer?

© Stack Overflow or respective owner

Related posts about mongodb

Related posts about mongomapper