I don't think this is the answer you are looking for but currently the advantage of using LINK/LINKSET for me is that it is the only relationship currently supported with transparent POJO binding.
I came to OrientDB because I was looking around for a new persistence mechanism where the underlying storage closely modelled a java POJO structure. Although a bit more limited than edges it does seem to more closely model object relationships. The native Object mapping in OrientDB is very nice (although a shame we don't have JDO bindings yet). As far as I'm aware the only way to do POJO mapping with graphs is with Tinkerpop Frames which imposes a rather horrible requirement to use interfaces and doesn't really allow you to work with pre-existing POJOs without major modification. On 23/02/14 06:07, uooq wrote: > Apologies up front, I'm very new to graph databases in general and > OrientDB in particular. > > I've learned that if I have a simple relationship to express, I can > model it with edges or links (and I understand there are many things > that can be done with edges that cannot be done with LINK or LINKSET, > etc). I'm wondering when using something like a LINKSET would be > preferable to creating an edge. > > The particular example I was playing with was one where I've got typed > vertices to represent People and Messages. Each Message is authored by > a Person and I'm creating a visibility filter where each Message is > visible to a set of People. > > for authorship I could do one of the following: > > * Message.author property of type LINK Person > * Create an Edge type Author from Person to Message > > for visibility I could do one of these: > > * Message.viewers property of type LINKSET Person > * Create an Edge type Viewer from Person to Message > > I'm already seeing that what I choose affects my ability to do > traversals in Gremlin (although I suspect I could filter on LINKSET > items in Gremlin?) so clearly there is a disadvantage to using > LINK/LINKSET for this reason. > > Are there any advantages to using LINK* relationships? In particular > I'm wondering if the visibility filter would execute faster as a > LINKSET. (For example, show me all Messages written by Person1 that > Person2 is allowed to see.) > -- > > --- > You received this message because you are subscribed to the Google > Groups "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
