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。
相关推荐
.小墨迹几秒前
Apollo学习——键盘控制速度
linux·开发语言·c++·python·学习·计算机外设
tanyyinyu17 分钟前
Python函数返回值的艺术:为何True/False是更优实践及例外情况分析
运维·数据库·python
web150854159351 小时前
使用Python开发经典俄罗斯方块游戏
python·游戏·pygame
缘友一世1 小时前
PyTorch LSTM练习案例:股票成交量趋势预测
pytorch·python·lstm
xiaohanbao091 小时前
day26 Python 自定义函数
开发语言·python·学习·机器学习·信息可视化·numpy
⁤͏͏⁦⁠͏1 小时前
5月15日day26打卡
python
像风一样自由20202 小时前
算法模型部署后_python脚本API测试指南-记录3
python·算法·支持向量机
赵青临的辉3 小时前
基础数学:线性代数与概率论在AI中的应用
人工智能·线性代数·概率论
HORSE RUNNING WILD3 小时前
解决 PicGo 上传 GitHub图床及Marp中Github图片编译常见难题指南
css·python·github
ElenaYu3 小时前
mac安装cast
python·macos·cast