In 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?
The sum of the vertex degree values is twice the number of edges, because each of the edges has been counted from both ends. In your case 6 vertices of degree 4 mean there are (6×4)/2=12 edges.
A complete graph has an edge between any two vertices. You can get an edge by picking any two vertices. So if there are n vertices, there are n choose 2 = (n2)=n(n−1)/2 edges.
A graph with 20 edges has 5 vertices of degree 5 with the rest of degree 4.
Edges are all about connecting vertices. Links are all about relations between other classes.
Two classes may not be associated at all, like a class
Oceans and a class
Person. But you can have their vertices associated by an Edge named Sailed that may have a property named withShipName`.
So you made a Person vertex called Jack Sparrow, and a Ocean vertex named Atlantic. Then you create an their edge relationship sailed which you can connect like:
Jack Sparrow sailed.withShipName= Black Pearl the Atlantic.
But if you have another Person vertex, like Red riding hood, you don't want to have a link in their vertex properties relating her with an Ocean class
.
However, you may want to have a linklist or linkmap linking the class
Ocean with class
OpticalActiveWaterConstituents, that have vertices to Chorophyll, Suspended Particles, Coloured Dissolved Organic Matter, etc... that are available in all Oceans with different concentrations.
You can refer to this post for the differences between Edges vs LinkList vs Linkmap.
Hope this help to clarify the subject ;)
If you don't have properties on your arch you can use a link, instead if you have it use edges.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With