In this challenge, you will create a new node for an actor not in the database, Daniel Kaluuya.
Create a new Person node for Daniel Kaluuya
Replace the ?????
with the correct Cypher to create a new Person node with the name
property of Daniel Kaluuya.
MERGE (p:????? {name: '?????'})
You can validate the node has been created using MATCH and filtering for the name
property of Daniel Kaluuya
.
MATCH (p:Person {name: 'Daniel Kaluuya'})
RETURN p
Validate Results
Once you have created the node, click the Check Database button to check the database and continue.
Hint
Add the :Person
node label and set the name
property to Daniel Kaluuya
.
The Person
label, name
property, and Daniel Kaluuya
value are all case sensitive.
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.
Run this Cypher query to create a Person node for Daniel Kaluuya:
MERGE (p:Person {name: 'Daniel Kaluuya'})
Summary
In this challenge, you used Cypher to create a node. In the next lesson, you will learn how to create relationships between nodes.