Returns the edge between from
and to
with given label.
Returns the vertex of a document.
Returns a vertex by its string key.
Returns a vertex by its string key.
Returns the vertex properties and its adjacency list.
Returns the vertex properties and its adjacency list.
vertex id
what edges to load
Returns the vertex properties and its both outgoing and incoming edges.
Returns true if the vertex exists.
Returns true if the vertex exists.
Translates a vertex string key to 64 bit id.
Returns the vertex id of a document vertex.
Returns the vertex id of a document vertex. Throws exception if the vertex doesn't exist.
The column qualifier of $id field.
The graph name.
Graph serializer.
Graph adjacency list table.
Returns a Gremlin traversal machine.
Returns a Gremlin traversal machine starting at the given vertex.
Graphs are mathematical structures used to model pairwise relations between objects. A graph is made up of vertices (nodes) which are connected by edges (arcs or lines). A graph may be undirected, meaning that there is no distinction between the two vertices associated with each edge, or its edges may be directed from one vertex to another. Directed graphs are also called digraphs and directed edges are also called arcs or arrows.
A multigraph is a graph which is permitted to have multiple edges (also called parallel edges), that is, edges that have the same end nodes. The ability to support parallel edges simplifies modeling scenarios where there can be multiple relationships (e.g., co-worker and friend) between the same vertices.
In a property graph, the generic mathematical graph is often extended to support user defined objects attached to each vertex and edge. The edges also have associated labels denoting the relationships, which are important in a multigraph.
Unicorn supports directed property multigraphs. Documents from different tables can be added as vertices to a multigraph. It is also okay to add vertices without corresponding to documents. Each relationship/edge has a label and optional data (any valid JsValue, default value JsInt(1)).
Unicorn stores graphs in adjacency lists. That is, a graph is stored as a BigTable whose rows are vertices with their adjacency list. The adjacency list of a vertex contains all of the vertex’s incident edges (in and out edges are in different column families).
Because large graphs are usually very sparse, an adjacency list is significantly more space-efficient than an adjacency matrix. Besides, the neighbors of each vertex may be listed efficiently with an adjacency list, which is important in graph traversals. With our design, it is also possible to test whether two vertices are adjacent to each other for a given relationship in constant time.