当前位置:网站首页>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设计是多线程的)
边栏推荐
- 引领数字医学高地,中山医院探索打造未来医院“新范式”
- QT: The Magical QVarient
- Increasing leetcode - a daily topic 1403. The order of the boy sequence (greed)
- XMjs cross-domain problem solving
- sql server installation prompts that the username does not exist
- How to solve the error cannot update secondary snapshot during a parallel operation when the PostgreSQL database uses navicat to open the table structure?
- sql怎么找字段里所有数据为空的字段
- Burp installation and proxy settings
- 通过模拟Vite一起深入其工作原理
- ffmpeg pixel format basics
猜你喜欢
![[Paper Notes] MapReduce: Simplified Data Processing on Large Clusters](/img/89/8adef42b0cfd154e6fa7205afaeade.png)
[Paper Notes] MapReduce: Simplified Data Processing on Large Clusters

Walter talked little knowledge | "remote passthrough" that something

冒泡排序与快速排序

【 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

新人如何入门和学习软件测试?

Shell script: for loop and the while loop

Details such as compiling pretreatment

Web3.0 Dapps——通往未来金融世界的道路

Flink 1.15.1 Cluster Construction (StandaloneSession)

冰蝎V4.0攻击来袭,安全狗产品可全面检测
随机推荐
如何在WordPress中添加特定类别的小工具
After the large pixel panorama is completed, what are the promotion methods?
Defect detection (image processing part)
Intersection of Boolean Operations in SuperMap iDesktop.Net - Repairing Complex Models with Topological Errors
In 2022, you still can't "low code"?Data science can also play with Low-Code!
运维监控系统之Open-Falcon
Android实战开发-Kotlin教程(入门篇-登录功能实现 3.3)
Package zip is not available, but is referred to by another package.
[Solved] Unity Coroutine coroutine is not executed effectively
Mathematics - Properties of Summation Symbols
用CH341A烧录外挂Flash (W25Q16JV)
Object.defineProperty monitors data changes in real time and updates the page
public static
List asList(T... a) What is the prototype? .NET Application -- Helloworld (C#)
剑指Offer--找出数组中重复的数字(三种解法)
Dynamic management of massive service instances
QT MV\MVC structure
Solana NFT开发指南
leetcode-每日一题1403. 非递增顺序的最小子序列(贪心)
测试薪资这么高?刚毕业就20K