HTTPS clone URL
Subversion checkout URL
Defining a Property Graph
- Backtrack Pattern
- Basic Graph Traversals
- Defining a More Complex Property Graph
- Defining a Property Graph
- Depth First vs. Breadth First
- Except Retain Pattern
- Flow Rank Pattern
- Getting Started
- Gremlin Groovy Path Optimizations
- Gremlin Methods
- Gremlin Steps
- JVM Language Implementations
- Learning Dependencies
- LinkedData Sail
- Loop Pattern
- MapReduce Pattern
- Path Pattern
- Pattern Match Pattern
- Release Notes
- SPARQL vs. Gremlin
- Split Merge Pattern
- Step Closures
- The Benefits of Gremlin
- Traversal Optimization
- Tree Pattern
- Updating a Graph
- User Defined Steps
- Using Gremlin through Groovy
- Using Gremlin through Java
- Using JUNG
- Writing Gremlin REPL Plugins
Clone this wiki locally
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.