We would keep handling the rest of meetup story on this blog. Dr Kim was preparing some example of Cypher query. Below query is to find a person’s friends. We can see some familiar clauses like WHERE, ORDER BY and LIMIT. It looks like a normal SQL query except this graph pattern.
Cypher does not use SELECT FROM clauses and join operators in SQL. Rather, it uses the MATCH clause and the graph patterns for reading data. This pattern describes a person is a friend of someone. In the WHERE clause, the person’s name is restricted to “TOM”. This query returns friend’s name and age, and the year since when they have been friends and then the results are ordered by friend’s name and limit the results to three rows.
It is very simple and easy to understand so we can understand this query even if we do not learn the Cypher yet.
This is the real power of the cypher, and We’ll show you more details about its features. We can also specify property values in the graph pattern. If we need to restrict a property value for a node, then we write the restriction inside the node parenthesis. If we want to do the same thing for relationships, the same syntax can be used inside the relationship’s square bracket.
We can also specify property values in the graph pattern. If users need to restrict a property value for a node, then they write the restriction inside the node parenthesis. If they also want to do the same thing for relationships, the same syntax can be used inside the relationship’s square bracket. Each matched node and relations can be assigned to a variable. In this case, we specify the variable name in the first place of each node or relation. In this example, the variable ‘a’ will be bound to the nodes which are matched to this node pattern.
Dr. Kim explained basic of graph data language, Cypher. He introduced the Cypher query language and its features well. The Cypher language queries the database using the graph patterns. It is very intuitive and simple. We hope you understand more about the graph database and the Cypher and enjoy to query using the Cypher.
After his presentation finished, every participate gave him an applause and would be satisfied for his explanation. Our next meetup will be open on the second week of November.
BITNINE GLOBAL INC., THE COMPANY SPECIALIZING IN GRAPH DATABASE
비트나인, 그래프 데이터베이스 전문 기업