redis

服务器

打开新终端

Redis数据库操作

Student键值对如下:

|--------------------------------------------------------------------------------------------|
| zhangsan:{ English: 69 Math: 86 Computer: 77 } lisi:{ English: 55 Math: 100 Computer: 88 } |

根据上面给出的键值对,完成如下操作:

  1. 用Redis的哈希结构设计出学生表Student(键值可以用student.zhangsan和student.lisi来表示两个键值属于同一个表);

Hmset student.zhangsan English 69 Math 86 Computer 77

Hmset student.lisi English 55 Math 100 Computer 88

  1. 用hgetall命令分别输出zhangsan和lisi的成绩信息;
  1. 用hget命令查询zhangsan的Computer成绩;
  1. 修改lisi的Math成绩,改为95。
相关推荐
2501_941111344 分钟前
实战:用OpenCV和Python进行人脸识别
jvm·数据库·python
ada7_4 分钟前
LeetCode(python)——73.矩阵置零
python·算法·leetcode·矩阵
程序员爱钓鱼16 分钟前
Python编程实战:用好 pdb 和 logging,程序再也不黑箱运行了
后端·python·trae
程序员爱钓鱼17 分钟前
Python编程实战:从 timeit 到 cProfile,一次搞懂代码为什么慢
后端·python·trae
2501_9411115125 分钟前
Python多线程与多进程:如何选择?(GIL全局解释器锁详解)
jvm·数据库·python
2501_9411113332 分钟前
使用Python处理计算机图形学(PIL/Pillow)
jvm·数据库·python
小小测试开发1 小时前
Python数据科学与图像处理利器组合:Prophet、Arch、Scikit-image、Pillow-heif用法全解析
图像处理·python·pillow
2501_941111371 小时前
Django全栈开发入门:构建一个博客系统
jvm·数据库·python
2501_941111344 小时前
Python上下文管理器(with语句)的原理与实践
jvm·数据库·python
晨非辰4 小时前
【数据结构初阶系列】归并排序全透视:从算法原理全分析到源码实战应用
运维·c语言·数据结构·c++·人工智能·python·深度学习