On 7/23/10 8:00 AM, Tony Giaccone wrote: > Yeah, you know.. > > I read that entry, and I certainly am in no position to comment on the cost > of SNS in the repository. > > What I can say, is that if you are going to model real world data, and by > data, I don't mean at the document level, but at a level of some detail, then > lists, arrays of items of the same type, are rampant and that is a data > structure that has to be accommodated. But items of the same type do not need to have the same name.
> > It's easy to say in the abstract, to use some identifying title as the name > of your node, as was done in the blog example, but... look at my example. > > There's no "name" for a line item, that you can use like you would a blog > posting. What's strange about this statement to me is that the line items in your original post very obviously DID have names. You just called them id: <lineItem id=1> Alex is correct that this isn't a very user-friendly name, but I'm not sure how much that matters *in this particular context*. > > Line items have limited data and they have exactly the same structure, and > they have data that's of the same types. > > So my question is, am I modeling at the wrong level of abstraction? Should I > have one node that describes the whole order? If so how do I handle line > items in that entry? I think you're heading in the right direction - one node containing the first-level properties of the order and then an ordered list of child nodes for the line items. As I said, I suggest using an intermediate node between the order node and the line items. > > If the solution isn't SNS then what is it? DNS (different named siblings) :) HTH, Justin > > > > Tony > > On Jul 23, 2010, at 4:12 AM, Bertrand Delacretaz wrote: > >> On Thu, Jul 22, 2010 at 9:44 PM, Justin Edelson <[email protected]> >> wrote: >>> On 7/22/10 3:17 PM, Tony Giaccone wrote: >>>> ...The problem I'm having is that I don't want to give each line item a >>>> unique name. >>>> Does a node have to have a unique name?... >>> Theoretically, no, each node does not need a unique name if you use same >>> name siblings.... >> >> Note that SNS are a bad idea for a variety of reasons, see rule #4 at >> http://wiki.apache.org/jackrabbit/DavidsModel >> >> -Bertrand >
