How to choose between Links and Edges to connect vertices?

54 views
Skip to first unread message

KY

unread,
Nov 17, 2015, 2:08:00 AM11/17/15
to orient-...@googlegroups.com
n orientDB, we have links and edges to connect vertices. I can't find out what the cons/pros of each of them on the orientdb documentation.

Forum Example - three entities involved: Author, Message, Forum.

An author writes a message in a forum. - Option one: message is an edge between Author and Forum vertices - Option two: Message has a link to Author and another link to Forum

In other words, what strategy to choose and why?

thanks!


http://stackoverflow.com/questions/33745609/orientdb-how-to-choose-between-links-and-edges-to-connect-vertices?s=4|0.3728


user.w...@gmail.com

unread,
Nov 17, 2015, 3:38:53 AM11/17/15
to orient-...@googlegroups.com
Hi,

if you don't have properties on your arch you can use a link, instead if you have it use edges.

Regards,

Michela

Luigi Dell'Aquila

unread,
Nov 17, 2015, 5:16:40 AM11/17/15
to orient-...@googlegroups.com
Hi,

an important point is if you will need to traverse the relationship in both directions. Only edges support bi-directional traversal

Thanks

Luigi

2015-11-17 9:38 GMT+01:00 <user.w...@gmail.com>:
Hi,

if you don't have properties on your arc you can use a link, instead if you have it use edges.

Regards,

Michela

--

---
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 orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

scott molinari

unread,
Nov 17, 2015, 8:55:41 AM11/17/15
to OrientDB
Luigi,

Isn't is also a point that link integrity is up to the application/ the developer, but edge integrity will be handled by ODB?

Scott

Luigi Dell'Aquila

unread,
Nov 17, 2015, 9:43:13 AM11/17/15
to orient-...@googlegroups.com
Hi Scott,

Yes, good point, simple links do not manage referential integrity, if you delete a linked instance you should also manually maintain the link.

Thanks

Luigi


--
Reply all
Reply to author
Forward
0 new messages