I'm interested in document-oriented databases, and I'd like to play with MongoDB. So I started a fairly simple project (an issue tracker), but am having hard times thinking in a non-relational way.
My problems:
I have two objects that relate to each other (e.g.
issue = {code:"asdf-11", title:"asdf", reporter={username:"qwer", role:"manager"}}
- here I have a user related to the issue). Should I create another document 'user' and reference it in 'issue' document by its id (like in relational databases), or should I leave all the user's data in the subdocument?If I have objects (subdocuments) in a document, can I update them all in a single query?