Reputation: 3323
I tried searching on this, but could not find any simple answer. Based on a image in this link it seems like it does, but I am not sure.
What I am talking about are examples like this:
Example 1: One Property
A --> B --> C Property 1: Knows
B "Knows" A and C.
Example 2: Multiple Properties
A --> B (I am not sure how to show multiple properties here) Property 1: Knows Property 2: Friends
A is "Friends" with B and A "Knows" B
Also is there some way to introduce Hierarchy. If A is "Friends" with "B" than A implicitly also "Knows" B.
A general yes or no would be enough. If there is some example or link that you can provide that has more explanation that would be great.
Thanks
Upvotes: 2
Views: 2121
Reputation: 9060
Course you can. OrientDB has 3 Graph API. One of these is the TinkerPop Blueprints API that are highly documented: http://github.com/tinkerpop/blueprints/wiki
To create 2 edges:
Vertex luca = graph.addVertex(null);
luca.setProperty( "name", "Luca" );
Vertex marko = graph.addVertex(null);
marko.setProperty( "name", "Marko" );
Edge lucaKnowsMarko = graph.addEdge(null, luca, marko, "knows");
Vertex jay = graph.addVertex(null);
marko.setProperty( "name", "Jay" );
Edge lucaRespectsJay = graph.addEdge(null, luca, jay, "respects");
Lvc@
Upvotes: 3