This is excellent insight and so far one of my favorite discussions!
Thanks for the detailed explanation, with examples! Although, I am
not clear as to what you mean by the con "Where do you get new IDs?
(ObjectIds?)"
I believe much of the PHP users' confusion comes from PHP's use of a
map for all its array behavior (which I have come to really like).
What are you thoughts on gearing Mongo towards these similar
constructs?
I hope to see new features in the future around subdocuments, mainly
because they are the whole benefit of document stores in the first
place. The ability to get away from relational models and create far
more intuitive and optimal representations. I would say these models
mesh far better with an object-oriented design/implementation in code,
but also create a more optimal retrieval methodology. Before I came
to know Mongo I had my own in memory implementation that is very
similar (even has secondary indexing) but of course proprietary to my
code and I found huge performance gains over traditional storage
models.
Aside from the current known issue of not being able to select
specifically the sub/embedded documents upon return I would like to
see the ability to see and treat these more like recursive objects.
Would be ideal to be able to say, select back just the sub-object if
desired. Even have the cursor able to iterate over the sub
collection. I could see in place updates happen while iterating as
well which
In some cases it makes better sense to have these in their own
collection, while in others there are redundancies created, thus more
indexing, larger storage requirements and potentially slower models.
Thanks again for your excellent response, I hope this will provide
clarity for others and help them avoid the troubles we had to
experience.
Cheers