We have seen in the previous blog posts how the entity-relationship is portrayed when working with the graph databases. So vertices are the entities whereas the edges are called the relationships. But they are actually just items inside the graph-based container.
The vertices and edges have properties associated with them. The properties are:
- ID property
- Label Property
and some other properties like maybe the partition key etc.
The ID property is like an identifier for your different vertices and edges and the Label property is like a name for these vertices and edges to differentiate between them as they would have names for themselves.
So we choose a good value for the partition key of the vertices for high-scale global distribution and use this value in an arbitrary property. And in such a way, each vertex becomes unique with the combination of the partition key and the ID.

EDGES
Edges, the relationships between two vertices, are again just items in the graph-based container. They connect two vertices, so the different property values that edges have are:
- ID property
- Label property
- Properties like partition key etc.
- Cardinality
All the properties have the same meaning as with the vertices but let us look at this new property called the Cardinality property. This basically refers to the no. of vertices attached to a particular edge. One basic edge will have cardinality 2 most of the times with only a source and a target vertex.
This is a small use-case scenario and in the next blog posts, we will see what it means by bidirectional flow, how to create a simple graph, how to write simple Gremlin queries and many more.
Leave a Reply