You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by "Oloan, Aidan" <ao...@edmunds.com> on 2008/01/24 01:20:26 UTC

References vs Paths

Currently in our project we're using Path arrays as to model one-to-many
relationships. 

 

Should we be using arrays of References instead? The obvious upside for
References is that bulk update operations would not be needed should a
node that's being referenced be moved somewhere else in the hierarchy.
How about the performance downsides? Is there a 'best practice' for
modeling one-to-many relationships in a Jackrabbit repository?

 

Thanks, Aidan


Re: References vs Paths

Posted by Nicolas Dufour <nr...@gmail.com>.
Hello Aidan

Based on my current experience, you should use path unless you know for sure
that the number of references will be low.

I was using reference a lot in my current project.
The problem is after a while those references were growing very fast and the
insertion slowing down.

You have to know that a reference property is an array of uuid but also tons
of other arrays stored in the target nodes.
So if you know that your referenced nodes will not be a lot, use reference.
Otherwise use a path and maintain their consistency.

There are a bunch of good design advices in the wiki about that too. Take a
look.

Nicolas

On Jan 23, 2008 7:20 PM, Oloan, Aidan <ao...@edmunds.com> wrote:

> Currently in our project we're using Path arrays as to model one-to-many
> relationships.
>
>
>
> Should we be using arrays of References instead? The obvious upside for
> References is that bulk update operations would not be needed should a
> node that's being referenced be moved somewhere else in the hierarchy.
> How about the performance downsides? Is there a 'best practice' for
> modeling one-to-many relationships in a Jackrabbit repository?
>
>
>
> Thanks, Aidan
>
>


-- 
Nicolas Dufour
nrdufour@gmail.com