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。
相关推荐
Warson_L12 小时前
Python `Annotated` 与 LangGraph Reducer 学习笔记
python
韩师傅12 小时前
海天线算法的前世今生
python·计算机视觉
韩师傅12 小时前
当你的甲方设备过烂,要如何快速出效果?
python·计算机视觉
Warson_L12 小时前
LangGraph的MessageState and HumanMessage
python
韩师傅12 小时前
当你的甲方吐槽天空不够蓝,你应该如何应对
python·计算机视觉
Warson_L13 小时前
python的类&继承
python
Warson_L13 小时前
类型标注/type annotation
python
ThreeS15 小时前
手搓MiniVLA全实战教程-一步一步用pytorch解释原理与思路
人工智能·python
金銀銅鐵17 小时前
[Python] 模 n 乘法的逆元计算器
python·数学·游戏