Query a Neo4j Graph Database With Cypher

Lab Steps

lock
Logging in to the Amazon Web Services Console
lock
Connecting to the Neo4j Web Application
lock
Querying the Graph Data

Ready for the real environment experience?

DifficultyIntermediate
Time Limit30m
Students10
Ratings
5/5
starstarstarstarstar

Description

Neo4j is becoming a standard for graph databases. With its simplicity and potential, you can start building reliable and useful databases. A key feature of Neo4j is the language used both as DDL and DML: Cypher. Cypher is a powerful language that uses clauses similar to SQL. Although, Neo4j is a NoSQL DBMS so Cypher doesn't work on structured data, as SQL does. When you need to query a graph database, you need to define the graph pattern first. A graph pattern is a graphical and logical way to identify the graph resources (nodes and edges) you want to query. You can think of a graph pattern as a subgraph of the whole graph you will query. Cypher uses an ASCII-Art syntax to represent the graph pattern. That's a very good approach because you can graphically think about what you need to query to create the Cypher query. In Cypher, nodes are referred with () and edges with []. One of the simplest graph patterns is the following: (:label_1)-[:type_1]->(:label2) which represents a relationship between two nodes (the first labelled with label_1 and the second labelled with label_2) through an arch whose type is type_1.

In this lab, you will use Cypher to query a Neo4j graph database.

Learning Objectives

Upon completion of this beginner level lab, you will be able to:

  • Understand how a graph pattern is structured
  • Perform graph queries using Cypher

Intended Audience

  • Data engineers who want to start using Neo4j as a graph database solution
  • Developers who want to start performing graph queries using Cypher

Prerequisites

The basic concepts of a graph database and of Neo4j are strictly recommended. To achieve these goals, you are suggested to follow this lab:

Environment before
PREVIEW
arrow_forward
Environment after
PREVIEW
About the Author
Students11104
Labs36
Learning paths1

Stefano studies Computer Science and is passionate about technology. He loves working with Cloud services and learning all the best practices for them. Google Cloud Platform and Amazon Web Services are the cloud providers he prefers. He is a Google Cloud Certified Associate Cloud Engineer. Node.js is the programming language he always uses to code. When he's not involved in studying or working, Stefano loves riding his motorbike and exploring new places.

Covered Topics