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。
相关推荐
南 阳13 小时前
Python从入门到精通day16
开发语言·python·算法
MasonYyp13 小时前
Agno中使用MCP
python
aiguangyuan13 小时前
从零实现循环神经网络:中文情感分析的完整实践指南
人工智能·python·nlp
喵手13 小时前
Python爬虫零基础入门【第九章:实战项目教学·第1节】通用新闻采集器:从零打造可复用的静态站模板!
爬虫·python·爬虫实战·python爬虫工程化实战·零基础python爬虫教学·新闻采集器·静态站模版
摸鱼仙人~13 小时前
从 Gunicorn 到 FastAPI:Python Web 生产环境架构演进与实战指南
python·fastapi·gunicorn
毕设源码-朱学姐13 小时前
【开题答辩全过程】以 基于Django框架中山社区社会补助系统为例,包含答辩的问题和答案
后端·python·django
醉舞经阁半卷书114 小时前
Matplotlib从入门到精通
python·数据分析·matplotlib
历程里程碑14 小时前
Linux 5 目录权限与粘滞位详解
linux·运维·服务器·数据结构·python·算法·tornado
程序员哈基耄14 小时前
安全高效,本地运行:全能文件格式转换工具
大数据·python·安全
koo36414 小时前
pytorch深度学习笔记18
pytorch·笔记·深度学习