newszine

Redis Set – Commands to manage a set value in redis datastore

5 years ago Lalit Bhagtani 0
Sets are an unordered collection of unique elements, In Redis, sets can be store as a value at key and several redis commands are used to store, manage and retrieved a set value stored in redis database. The syntax for using redis commands is as follows :- Syntax :- redis host:post> <Command Name> <key name> Read More

How to perform difference of set values- Redis SDIFF | SDIFFSTORE

5 years ago Lalit Bhagtani 0
In this tutorial, we will learn about how to perform the difference operation on two or more sets value stored in redis datastore, by using redis SDIFF and SDIFFSTORE command. Difference of Sets: In set theory, the difference of two sets A and B, written as A – B is a set which contains all Read More

How to perform intersection of set values- Redis SINTER | SINTERSTORE

5 years ago Lalit Bhagtani 0
In this tutorial, we will learn about how to perform the intersection operation on two or more sets value stored in redis datastore, by using redis SINTER and SINTERSTORE command. Intersection of Sets: In set theory, the intersection of two or more sets is the set which contains the elements that are common to all Read More

How to perform union of set values – Redis SUNION | SUNIONSTORE

5 years ago Lalit Bhagtani 0
In this tutorial, we will learn about how to perform the union operation on two or more sets value stored in redis datastore, by using redis SUNION and SUNIONSTORE command. Union of Sets: In set theory, the union of two or more sets is the set which contains all the elements ( distinct ) present Read More

How to delete an element from a set in redis – Redis SPOP | SREM

5 years ago Lalit Bhagtani 0
In this tutorial, we will learn about how to delete an element from a set value stored at a key, using redis SPOP and SREM command. SPOP Command :- This command, removes and returns one or more random elements from the set stored at the specified key. The syntax of redis SPOP command is as Read More

Redis SRANDMEMBER – How to get random elements from a set in redis

5 years ago Lalit Bhagtani 0
In this tutorial, we will learn about how to get one or more random elements from a set value stored at a key. For this we will use a COMMAND – SRANDMEMBER in redis-cli. The syntax of redis SRANDMEMBER command is as follows :-  Syntax :- redis host:post> SRANDMEMBER <key name> Output :-  -(string value) Read More

Redis LLEN – How to get a length of the list in redis datastore

5 years ago Lalit Bhagtani 0
In this tutorial, we will learn about how to get the length of a list value stored at the key. For this, we will use Redis LLEN command. LLEN Command This command returns the length ( number of elements ) of a list value stored at the key. If a key doesn’t exist in redis datastore, it Read More