Creating a Node

It’s time that we update our database.

Use the sandbox window to the right to create a new Person node for the rising star Daniel Kaluuya.

Remember that our other Person nodes contain a property called name which is considered our primary key.

Validate Results

Once you have run the query, click the Check Database button and we will check the database for you.

Hint

To find the node in the database, we would run the following Cypher statement:

cypher
MATCH (p:Person {name: 'Daniel Kaluuya'})
RETURN p

Hint: All you need to do is change the first keyword in the query.

Solution

To create the Person node you can either use the CREATE or MERGE keywords. The MERGE statement in the query below will only create the node if it does not already exist in the graph.

cypher
MERGE (p:Person {name: 'Daniel Kaluuya'})

Summary

In this challenge, you demonstrated your skill of creating a node. In the next lesson, you will learn how to create relationships in the graph.