Redis - An in-memory database

Redis - An in-memory database

What is Redis?

Redis (Remote Dictionary Server) is an open source, in-memory data structure store, used as a database, cache, and message broker.

Let's Break it down to understand better.

Redis is a KEY-VALUE store i.e. a store/server that stores data as key-value pairs.

Example:

No alt text provided for this image

This key-value store can be used as a database to read and write data.

To Write data in Redis use SET command, like below

No alt text provided for this image

To Read data from Redis use GET command, like below

No alt text provided for this image

Other Features:

  • Redis is a NoSQL Database, i.e. doesn’t have tables, columns, rows, functions, procedures, etc and doesn’t use SELECT, UPDATE, INSERT, DELETE operations.
  • Redis uses String, Lists, Sets, Sorted Sets, Hashes, Bitmaps, Hyperloglogs, Geospatial indexes Data Structures to store data.
  • Interaction with data is command based. Go through commands on Redis official Documentation Page :https://redis.io/commands
  • Its an in-memory database with persistence options, hence keeps the whole dataset in RAM, hence you only access the main memory and it makes it very fast to write and read data.

Why to use Redis?

Redis has below features/advantages:

No alt text provided for this image

Redis is very fast and can perform about 110000 SETs per second, about 81000 GETs per second.

To know more, visit https://redis.io/

Thanks for reading!!

To view or add a comment, sign in

More articles by Jyoti Jindal

  • Time Complexity

    If you ever appeared in a Tech Interview, your interviewer must have asked you to identify the running time complexity…

  • Implementation of Java substring() in Java 6, and why it was changed in Java 7?

    String is a special class in Java and substring() method of String class is one of the widely used methods of String…

  • HashMap

    HashMap is the ultimate choice for our application if it demands faster insertion and retrieval. While selecting the…

    11 Comments
  • Searching Algorithms

    Searching Algorithms are designed to find an element or retrieve an element from any data structure where it is stored.…

    4 Comments
  • Flowchart - A Diagrammatic Representation of an Algorithm

    Introduction Here are the steps to be followed to solve an algorithmic problem: Analysing the problem statement and…

  • Let's Learn JSON Together

    JSON stands for JavaScript Object Notation JSON is an open standard lightweight data-interchange format that uses…

    3 Comments

Explore content categories