Table of contents
1.
Introduction
2.
Primary features
3.
Building
4.
Installing RedisGraph
5.
Using RedisGraph
5.1.
With redis-cli
5.2.
With any other client
6.
Commands
6.1.
RedisGraph Features
6.2.
RedisGraph API
7.
Frequently Asked Questions
7.1.
What can you do using Redis?
7.2.
Is RedisGraph open source?
7.3.
What language is Redis written in?
7.4.
What are the ways to interact with Redis?
7.5.
What is the command line for Redis?
8.
Conclusion
Last Updated: Mar 27, 2024

Commands of Redis Graph

Author Manan Singhal
0 upvote

Introduction

RedisGraph is a Redis-based graph database. GraphBlas power this graph database's sparse adjacency matrix graph representation.

Primary features

  • The property graph model was used.
  • Labels can be assigned to nodes in any number.
  • There are different types of relationships.
  • Sparse adjacency matrices are used to represent graphs.
  • The query language is Cypher.
  • Linear algebra expressions are generated from Cypher queries.

Building

Requirements:

  • The RedisGraph repository: git clone --recurse-submodules -j8 https://github.com/RedisGraph/RedisGraph.git
  • Run apt-get install build-essential cmake m4 automake peg libtool autoconf on Ubuntu Linux.
  • On OS X, run brew install cmake m4 automake peg libtool autoconf to see if homebrew is installed.

The version of Clang included with the OS X toolchain does not support OpenMP, which RedisGraph requires. Running brew install gcc g++ and following the on-screen directions to update the symbolic links is one approach to fix this. Note that this is a system-wide update; setting the environment variables for CC and CXX will suffice if that isn't possible.

To build, run make in the project directory.

Check out most important Git Interview Questions here.

Installing RedisGraph

RedisGraph is a Redis Stack component. For installation, see the Redis Stack official download page.

Using RedisGraph

It would be beneficial to become familiar with RedisGraph's commands and syntax before using it, as specified in the command reference.

RedisGraph commands are accessible from any Redis client.

With redis-cli

$ redis-cli
127.0.0.1:6379> GRAPH.QUERY social "CREATE (:person {name: 'roi', age: 33, gender: 'male', status: 'married'})"

With any other client

You can interact with RedisGraph by sending raw Redis instructions from your client. Your preferred client determines the precise procedure for doing so.

Commands

RedisGraph Features

RedisGraph uses the openCypher query language to enable graph database capability within Redis. Its basic commands accept openCypher queries, and it also has configuration and metadata retrieval capabilities.

RedisGraph API

Filtering for the module or a single command, such as [GRAPH.QUERY](/commands/?name=graph.query), will return command details. The syntax for the commands is included in the details, where:

  • GRAPH.CONFIG or SET is an example of an uppercase command and subcommand.
  • Optional parameters, such as [timeout], are placed in square brackets.
  • An ellipsis(...) indicates additional optional arguments.

The name of a graph key is required as the first argument for most commands.

Frequently Asked Questions

What can you do using Redis?

Redis Strings is a binary-safe data format and one of Redis' most flexible building blocks. Strings, integers, floating-point values, JPEG images, serialized Ruby objects, and so on can all be stored in it.

Is RedisGraph open source?

While Redis remains open-source, higher-value modules are now protected by a commercial agreement that restricts the sale of Redis-based products. Redis Labs has moved its database modules away from open source and toward a new commercial licensing system that includes source code access.

What language is Redis written in?

Redis is a cache solution and session management system developed in ANSI C. It generates one-of-a-kind keys for storing data.

What are the ways to interact with Redis?

You can either use the Redis Client given by the Redis installation or open a command prompt and type the following command: redis-cli

What is the command line for Redis?

To launch the Redis client, open a terminal and type redis-cli. This will establish a connection to your local server, from which you can issue any command. We connect to a Redis server running on the local machine and run the command PING to see if the server is up and running.

Conclusion

In this article, we have learned the Commands of Redis Graph. We hope that this blog will help you understand the concept of commands used in the Redis graph, and if you would like to learn more about it, check out our other blogs on redismongo-dBdatabase, and operational database.

Attempt our Online Mock Test Series on Coding Ninjas Studio now!

Happy Coding!

Live masterclass