Redis Compass (Redis Data Structures) — Part 2

We continue from our redis compass series, in part 1 we introduced redis and compared it with RDBMS databases, now we will cover redis data structures.

Redis Data Structures

These are essentially how redis represents data.  Redis supports five(5) data structures which are:

    If you’ve programmed before, this should be a little bit familiar. In redis, STRING data structures can be used to contain integer values, string values and other floating-point values. It supports various operations such as set and get. we will go into more detail in upcoming posts.
  • LIST:
    This is a linked-list kind of structure ( all nodes have a cursor to the next node ) that contains STRINGS. It supports various operation commands such as LPUSH, LPOP e.t.c, again don’t worry too much about the commands, we will go into more detail in upcoming posts.
  • HASH:
    This is based on hash-table( unordered hashtable) that stores data in key-value pair.
  • SET:
    This is somewhat similar to List in the sense that they are both collections of STRINGS, what makes SET different is used for maintaining a unique collection i.e. no repetition of the same value and the ordering is not priority, as such, data stored as SET in Redis could be returned in any order.
  • ZSET:
    This is also like SET but in this case the data is ordered based on a value called score which we will study later in detail.

Next we will study about The STRING Datastructure


Leave a Reply

Your email address will not be published. Required fields are marked *