Cypher Manual

Cypher is a query language for graph data. The characteristics are as below:

  • Declarative

    Cypher is a declarative language describing what the program must accomplish rather than how to accomplish it. C and Java are the imperative languages state the algorithms. In contrast, Cypher states its goal. This particular way allows the users to create specific queries in easier way.

  • Pattern Matching

    The way of querying in Cypher is just like drawing a picture. Users will express the graph pattern they look for with brackets and hyphens like ASCII, so the queries made by the users are intuitive.

  • Expressive

    Cypher borrowed various processing method for plentiful query expression – e.g., WHERE, ORDER BY, etc., from SQL, pattern matching from SPAROL, and collection from Haskell and Python. As a result of this way, the users are allowed to make query more comfortably and simply.

Elements of Cypher

The basic elements of Cypher are vertex, edge, vlabel, elabel, property, variable.

  • Vertex

    Vertex is the basic element of graph and means entity. In most cases, vertex means entity, but it could be used differently for different purposes.

  • Edge

    Edge means the relation between each vertex. That is, edge couldn’t exist without linkable vertex.

  • Vlabel

    Vlabel is a user defined name as a standard to divide vertexes.

  • Elabel

    Elabel is the name of edge. It shows the relation between each vertex.

  • Property

    Property is a attribute for vertex or edge individually.

  • Variable

    Variable is a identifier of vertex or edge. It is named randomly.

This guide provides complete reference for Cypher query language in AgensGraph. Learn syntax, clauses, and available functions for querying graph data.