当前位置:网站首页>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设计是多线程的)
边栏推荐
- Walter talked little knowledge | "remote passthrough" that something
- 用CH341A烧录外挂Flash (W25Q16JV)
- (11) Metaclass
- [Filter tracking] based on matlab unscented Kalman filter inertial navigation + DVL combined navigation [including Matlab source code 2019]
- 【 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
- Queue Topic: Recent Requests
- Android Practical Development - Kotlin Tutorial (Introduction - Login Function Implementation 3.3)
- Dameng 8 database export and import
- 论治理与创新,2022 开放原子全球开源峰会 OpenAnolis 分论坛圆满落幕
- This year's Qixi Festival, "love vegetables" are more loving than gifts
猜你喜欢

结构体初解

【 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
![Tencent Cloud [Hiflow] New Era Automation Tool](/img/ac/5c61424f22cd9fed74dcd529fdb6a4.png)
Tencent Cloud [Hiflow] New Era Automation Tool

presto启动成功后出现2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer

测试薪资这么高?刚毕业就20K

通过模拟Vite一起深入其工作原理

Step by step how to perform data risk assessment

Confessing the era of digital transformation, Speed Cloud engraves a new starting point for value

21 Days Learning Challenge (2) Use of Graphical Device Trees

The Tanabata copywriting you want has been sorted out for you!
随机推荐
[Storage] Dawning Storage DS800-G35 ISCSI maps each LUN to the server
Slapped in the face: there are so many testers in a certain department of byte
.NET应用程序--Helloworld(C#)
sql server 安装提示用户名不存在
Beyond YOLO5-Face | YOLO-FaceV2 officially open source Trick+ academic point full
引领数字医学高地,中山医院探索打造未来医院“新范式”
Leading the highland of digital medicine, Zhongshan Hospital explores to create a "new paradigm" for future hospitals
Simple description of linked list and simple implementation of code
presto启动成功后出现2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer
In 2022, you still can't "low code"?Data science can also play with Low-Code!
Use CH341A to program external Flash (W25Q16JV)
Thinking (88): Use protobuf custom options for multi-version management of data
大像素全景制作完成后,推广方式有哪些?
Kubernetes 网络入门
Initial solution of the structure
rpc-remote procedure call demo
2022.8.4-----leetcode.1403
[Paper Notes] MapReduce: Simplified Data Processing on Large Clusters
QT MV\MVC structure
Getting Started with Kubernetes Networking