当前位置:网站首页>Redis1:Redis介绍、Redis基本特性、关系型数据库、非关系型数据库、数据库发展阶段
Redis1:Redis介绍、Redis基本特性、关系型数据库、非关系型数据库、数据库发展阶段
2022-08-05 03:26:00 【郝开】
Redis介绍
Remote Dictionary Service:翻译过来就是远程字典服务,简称redis。
为什么使用redis,需要先弄明白关系型数据库和非关系型数据库的区别,也就是SQL和NoSQL的区别和使用场景。
关系型数据库
俗称的SQL数据库,主流的MySQL、Oracle。
关系型数据库的特点
- 基于行存储数据,二维的模式(用表格的方式存储,有行有列)
- 存储结构化的数据,数据存储有固定的模式(schema)
- 表与表之间存在关联(Relationship)
- 大都支持SQL(结构化查询语言)的操作,支持复杂的关联查询
- 通过支持事务ACID(酸)来提供严格或者实时的数据一致性
关系型数据库的不足
- 要实现扩容难,只能向上(垂直)扩展,不支持动态的扩缩容,如果要实现水平扩容的话,需要引进一些复杂的技术,比如分库分表
- 表结构修改困难,因此存储的数据格式也受到限制
- 高并发情况下,基于磁盘的读写压力比较大
非关系型数据库
non relational,或者NoSQL,主流的Redis、MongoDB。
开始的时候,之所以叫NoSQL,刚开始是因为它不支持结构化查询语言(SQL)的操作,后来演变成not only SQL,不仅仅是SQL。
非关系型数据库特点
- 存储非结构化的数据,比如文本、图片、音频、视频
- 表与表之间没有关联,可扩展性强
- 保证数据的最终一致性,遵循BASE(碱)理论
- 支持海量数据的存储和高并发的高效读写
- 支持分布式,能够对数据进行分片存储,扩缩容简单
NoSQL的类型
- KV存储:Redis和Memcached
- 文档存储:MongoDB
- 列存储:HBase
- 图存储:Neo4j
- 对象存储
- XML存储
- ······
数据库发展阶段
| 特性 | SQL | NoSQL | NewSQL(比如TiDB) |
|---|---|---|---|
| 关系模型 | √ | × | √ |
| SQL语法 | √ | × | √ |
| ACID | √ | × | √ |
| 水平扩展 | × | √ | √ |
| 海量数据 | × | √ | √ |
| 无结构化 | × | √ | √ |
Redis基本特性
- 速度快,放在了内存当中
- 支持多种数据类型(Memcached只支持KV)
- 支持多种编程语言
- 持久化、内存淘汰(Memcached没有持久化的机制)
- 功能丰富:事务、发布订阅、pipeline、lua
- 集群、分布式(Memcached不支持集群的主从设置,Memcached设计是多线程的)
边栏推荐
- Cybersecurity and the Metaverse: Identifying Weak Links
- [Storage] Dawning Storage DS800-G35 ISCSI maps each LUN to the server
- sql server 安装提示用户名不存在
- QStyle platform style
- public static <T> List<T> asList(T... a) 原型是怎么回事?
- Use CH341A to program external Flash (W25Q16JV)
- How to solve the error cannot update secondary snapshot during a parallel operation when the PostgreSQL database uses navicat to open the table structure?
- Burp installation and proxy settings
- This year's Qixi Festival, "love vegetables" are more loving than gifts
- 用CH341A烧录外挂Flash (W25Q16JV)
猜你喜欢

Details such as compiling pretreatment

MRTK3 develops Hololens application - gesture drag, rotate, zoom object implementation

Why did they choose to fall in love with AI?

Dive into how it works together by simulating Vite
![Tencent Cloud [Hiflow] New Era Automation Tool](/img/ac/5c61424f22cd9fed74dcd529fdb6a4.png)
Tencent Cloud [Hiflow] New Era Automation Tool

Increasing leetcode - a daily topic 1403. The order of the boy sequence (greed)

Beidou no. 3 short message terminal high slope in open-pit mine monitoring programme

After the large pixel panorama is completed, what are the promotion methods?

QT language file production

Confessing the era of digital transformation, Speed Cloud engraves a new starting point for value
随机推荐
Shell script: for loop and the while loop
数学-求和符号的性质
sql server installation prompts that the username does not exist
开发Hololens遇到The type or namespace name ‘HandMeshVertex‘ could not be found..
[Filter tracking] based on matlab unscented Kalman filter inertial navigation + DVL combined navigation [including Matlab source code 2019]
21天学习挑战赛(2)图解设备树的使用
Beyond YOLO5-Face | YOLO-FaceV2 officially open source Trick+ academic point full
The sword refers to Offer--find the repeated numbers in the array (three solutions)
高项 02 信息系统项目管理基础
【 genius_platform software platform development 】 : seventy-six vs the preprocessor definitions written cow force!!!!!!!!!!(in the other groups conding personnel told so cow force configuration to can
CPDA|How Operators Learn Data Analysis (SQL) from Negative Foundations
Android Practical Development - Kotlin Tutorial (Introduction - Login Function Implementation 3.3)
How to solve the error cannot update secondary snapshot during a parallel operation when the PostgreSQL database uses navicat to open the table structure?
The linear table lookup
Beidou no. 3 short message terminal high slope in open-pit mine monitoring programme
sql怎么找字段里所有数据为空的字段
21 Days Learning Challenge (2) Use of Graphical Device Trees
High Item 02 Information System Project Management Fundamentals
presto启动成功后出现2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer
Details such as compiling pretreatment