Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Defining a Property Graph
Attention: this Wiki hosts an outdated version of the TinkerPop framework and Gremlin language documentation.
Gremlin was designed specifically for the analysis and manipulation of key/value-based, directed, multi-relational graphs. This long term refers to a type of graph data structure that has certain features. These features are described as follows. The first term, key/value, refers to the fact that both vertices and edges can have any number of properties associated with them. The second term, directed, refers to the fact that the edges in the graph have a directionality — that is, there is a tail and head to each edge. Finally, the third term, multi-relational, refers to the fact that there can many types of edges and thus, many types of relationships can exist between the vertices. For the remainder of this documentation, and for the sake of brevity, these types of graphs will be called property graphs. A property graph is demonstrated in the following example. This diagrammed property graph comes with the Gremlin distribution in GraphML format at
data/graph-example-1.xml (see graph-example-1.xml) or GraphSON at
data/graph-example-1.json (see graph-example-1.json)
A property graph has these elements:
- a set of vertices
- each vertex has a unique identifier.
- each vertex has a set of outgoing edges.
- each vertex has a set of incoming edges.
- each vertex has a collection of properties defined by a map from key to value.
- a set of edges
- each edge has a unique identifier.
- each edge has an outgoing tail vertex.
- each edge has an incoming head vertex.
- each edge has a label that denotes the type of relationship between its two vertices.
- each edge has a collection of properties defined by a map from key to value.
Learn more about the property graph data model from Blueprints.