If you’re a Redis user who prefers to use a Graphical User Interface(GUI) for graph queries, then RedisInsight is a right tool for you. It’s 100% free pure desktop Redis GUI that provides easy-to-use browser tools to query, visualize and interactively manipulate graphs. You can add new graphs, run queries and explore the results over the GUI tool.
RedisInsight supports RedisGraph and allows you to:
- Build and execute queries
- Navigate your graphs
- Browse, analyze, and export results
- Keyboard shortcuts to zoom
- Button to reset view; center entire graph
- Zoom capability via mouse wheel(Double right-click to zoom out, Double right-click to zoom out.)
- Ability to copy commands with a button click
- Ability to persist nodes display choices between queries
As a benefit, you get faster turnarounds when building your application using Redis and RedisGraph.
Follow the below steps to see how your data is connected via the RedisInsight Browser tool.
Follow this link to create a Redis database using Redis Enterprise Cloud with RedisGraph module enabled
To install RedisInsight on your local system, you need to first download the software from the Redis website.
Click this link to access a form that allows you to select the operating system of your choice.
Run the installer. After the web server starts, open http://YOUR_HOST_IP:8001 and add a Redis database connection.
Select "Connect to a Redis database"
Enter the requested details, including Name, Host (endpoint), Port, and Password. Then click “ADD REDIS DATABASE”.
Select RedisGraph from the menu.
Let us add individuals to the graph. CREATE is used to introduce new nodes and relationships.Run the below cypher query on RedisInsight GUI to add a label called person and property called “name”.
As we see that “1” label is added and that refers to a person label. It’s the same for every node and hence created once. Overall there are 5 nodes created. The five “name” properties refer to 5 name properties that have been added.
Match describes the relationship between queried entities, using ascii art to represent pattern(s) to match against. Nodes are represented by parentheses () , and Relationships are represented by brackets  .
As shown below, we have added lowercase “p” in front of our label and is a variable we can make a reference to. It returns all the nodes with a label called “Person”.
You can select "Graph View" on the right menu to display the graphical representation as shown below:
Run the below query to build a relationship between two nodes and how the relationship flows from one node(“Tom”) to the another node(“Alex”).
The symbol “>” (greater than) shows which way the relationship flows.
You can view the relationship in the form of graph as shown below:
Run the below query to create and visualize relationsship between the multiple individuals
Let us look at how to generate graph showcasing the relationship between two individuals - Susan and Bill
This can be achieved by “friend of friends” kind of relationship. Say, If Tom wanted to social network with Jane. He has two contacts that know Jane - one is Susan and the other person is Bill.
In this query, we assign a variable “p” to a node graph path. We search for “Tom” as p1 and “Jane” as “p2”. We say interested in knows link with 1..3 degree of separation.
Let us try to insert bulk data using Python and then extrapolate it in the form of nodes and relationships.