Joining Database Tables on Non-Foreign Key Fields.Navicat 16.3 Adds Support for Redis Cluster. ![]() What Sets Redis Apart from Other Databases.Understanding Navicat Connection Profiles.Choosing Between Redis and a Traditional Relational Database.Measuring Query Execution Time in Relational Databases.The trial version is fully functional for 14 days. Interested in giving Navicat for Redis a try. Next time, we'll learn some more commands for working with data using redis-cli commands, along with how to accomplish the same thing using Navicat. In this tutorial, we learned how to write, read, update, and delete keys using the redis-cli as well as Navicat for Redis. A dialog will ask us to confirm before proceeding with the delete, in case we happened to click it by accident! Conclusion In Navicat, we can delete a key by selecting it in the table and then clicking the Delete button. It's syntax is:įor example, the following command would delete the "auth service" key:īe careful Redis does not ask you to confirm the operation! In Redis, we can use the DEL command to delete a key, along with all of its associated values. Of course, in Navicat, both keys and values can be modified at any time using the Editor: Deleting Data In Redis, the SET key Value command works for both setting the initial value as well as for updates. That returns the first three values of the sorted set. So, to retrieve the values for "indiana_jones_episodes", we can use ZRANGEBYSCORE and include the min and max arguments as follows: if value is of type stream -> xread count streams.if value is of type sorted sets -> ZRANGEBYSCORE.if value is of type hash -> HGET or HMGET or HGETALL.Here are the commands to retrieve key value(s): Since Redis supports 6 data types, you need to know what type of value that a key maps to, as for each data type, the command to retrieve it is different. However, if we try to fetch the value for "indiana_jones_episodes", we get an error "WRONGTYPE Operation against a key holding the wrong kind of value". Here's an example in Navicat for Redis that fetches the value for the key "auth service" shown below:Īs expected, it returns its value of "auth0": ![]() We can use the GET command to ask Redis for the string value of a key: So how to we write, read, update, and delete data in Redis? This tutorial will cover how to write, read, update, and delete keys using the redis-cli as well as Navicat for Redis. ![]() Since Redis is a key-value store that lets us associate values with a key, it does not use the Data Manipulation Language (DML) and query syntax as relational databases. Working with Keys in Redis by Robert Gravelle
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |