In this challenge, you will use the Neo4j Cypher MCP server installed in Installing the Neo4j Cypher MCP server to explore the movies database schema.
If you haven’t already completed this lesson, please do so now.
Otherwise, let’s get started!
How to complete this challenge
Your goal is to find out which outgoing relationships go from a User node in the movies database.
Step 1: Open VS Code Copilot
In VS Code, open the Copilot chat window.
Ensure that the chat is in Agent mode by selecting the Agent
option in the bottom left hand corner of the chat window.
Step 2: Ask About User Relationships
Ask Copilot the specific question:
What outgoing relationships does the User node have?
Step 3: Review the Response
Copilot will use the get-neo4j-schema
tool to examine the database schema and provide information about User node relationships.
If you have followed the instructions correctly, you should now see a response from Copilot that answers the question.
User Node Relationships
After exploring the database schema, what outgoing relationship does a User node have in the movies database?
-
❏
WATCHED
-
✓
RATED
-
❏
LIKED
-
❏
REVIEWED
-
❏
FOLLOWS
Hint
Use Copilot to ask about the database schema. You can ask a vague question to get a comprehensive overview of the schema:
What is the schema of the movies database?
Or you can ask a more targetted question to get information about a specific node type:
What relationships does a User node have?
Copilot should give you a single answer to the question.
Solution
The correct answer is RATED.
According to the movies database schema, User nodes are connected to Movie nodes through the RATED relationship. This means users can rate movies, and this rating relationship is stored as an outgoing relationship from the User node to the Movie node.
The other options (WATCHED, LIKED, REVIEWED, FOLLOWS) are not present in this particular database schema.
Summary
You used the get-neo4j-schema
tool to identify the outgoing relationships for User nodes in the movies database.
In the next challenge, you will invoke the read-neo4j-cypher
tool to answer a question about the dataset.