Question: Click on Get Started button It will create an initial database, click on Connect button. Click on RedisInsight, open with RedisInsight this is an advance
Click on Get Started button
It will create an initial database, click on Connect button.
Click on RedisInsight, open with RedisInsight this is an advance GUI to interact with the database.
Click on the Workbench icon on the left, you can then type commands in the workbench area and click on the Play button on the right to enter the data.
NOTE: Take screenshot at the end of each stage
The data that can be added to the database
You can add various types of data, including String, List, Set, Hash and Zset to Redis. This is just an example, try with your own data and take a screenshot.
Example:
SET name "mirza"
OK
GET name
"mirza"
DEL name
GET name
nil
Try adding a few other keys and values to the database.
Set allows storing unique data
Sadd add a value in a set
Srem remove a value in a set
Smembers shows all values in a set
For example, sadd databases SQLServer
sadd databases PostreSQL
Hash allows adding keyvalue pairs
Hset, hget, hdel to add, get and remove key value pairs
hset pets dog waldo
Try adding several items to a set and remove some items.
A list allows storing data as a sequence
lpush adds data to the list
lpop removes first data from the list
rpop removes last data added to the list
lrange would remove a range of data from the list
Example:
lpush cities Jacksonville
lpush cities Orlando
lpush Miami
lpop cities
rpop cities
lrange cities
Try adding several items to a list and remove some items.
Working with Geospatial data
We can set up location data of points of interest within an area latitude longitude and then compute distances etc., as in the driving and travel apps. Please take screenshots after completing each step
To add one location, use geoadd orlando "disney world"
To add multiple locations, use geoadd orlando "magic kingdom" "epcot" "universal". Note: it responds by number of points added.
To view, added points of interest, use: zrange orlando
Search for locations
To search within a distance, we can search using latitude and longitude: georadius orlando mi
We can also use desc descending and asc ascending distances: georadius orlando mi desc
To include distances also, use georadius orlando mi desc withdist
Set up and Search for locations in Jacksonville
See the table of some Jacksonville area locations, add at least three more locations of your choice.
Find out how many locations are with miles of your home or work You can use FSCJ location as well
List and Identify in what order would you like to visit those locations.
Location
Latitude
Longitude
Name
Jacksonville
TIAAfield
Jacksonville
JaxAirport
Jacksonville
TownCtr
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
