当前位置:网站首页>MongoDB系列之SQL和NoSQL的区别
MongoDB系列之SQL和NoSQL的区别
2022-06-12 16:18:00 【SmileNicky】
在选择数据存储时,经常会选择关系型数据库(SQL)和非关系型数据库(NoSQL)进行数据存储,这两种数据各有优缺点,下面进行简单对比
关系型数据库对比非关系型数据库
主要区别:
- 定义 SQL数据库称之为关系型数据库(RDBMS);而NoSQL数据库被称之为非关系型数据库或者分布式数据库
- 分布式 SQL要支持分布式需要借助于一些第三方组件,比如mycat等实现分布式,而NoSQL数据库默认支持分布式,内带分布式的解决方案
- 结构 SQL是基于表存储数据的,所以SQL是一门结构化的查询语言,修改表结构都可能会影响系统数据存储。而NoSQL数据库是键值对、基于文档、图形数据库或宽列存储等等方式,所以NoSQL 数据库具有用于非结构化数据的动态模式。
- 查询 SQL是可以进行多表联合查询的,所以SQL可以处理复杂的业务,进行复杂的多表关联查询;NoSQL存储结构不固定,可以是
key/value的键值,也可以是面向文档的、面向列的、基于图形的。所以SQL更适合于成为需要多行事务的应用程序 - 事务 SQL遵循严格的事务一致性,也即ACID属性(原子性、一致性、隔离性和持久性),而 NoSQL 数据库遵循 分布式的CAP 定理(一致性、可用性和分区容错性)。
- 拓展 有时候要提供SQL数据库的性能,可以通过加CPU 或 SSD 等内容来增加单个服务器的负载。而NoSQL可以通过可以通过分片或在 NoSQL 数据库中添加更多服务器
关系型数据库 | NoSQL数据库 |
|---|---|
关系型数据库管理系统RDBMS | 非关系型分布式数据库系统 |
不支持分布式 | 默认支持分布式,内置分布式解决方案 |
结构化查询语言 | NoSQL 数据库具有用于非结构化数据的动态模式 |
适合复杂关联查询 | 不适合复杂关联查询 |
遵循ACID属性 | 遵循CAP()遵循 CAP(一致性、可用性、分区容错性) |
可以通过加CPU 或 SSD 等内容来增加单个服务器的负载 | 可以通过分片或在 NoSQL 数据库中添加更多服务器 |
示例: MySQL、PostgreSQL、Oracle、SQL Server 等 | 示例: MongoDB、GraphQL、HBase、Neo4j、Cassandra 等 |
边栏推荐
- Object.keys遍历一个对象
- Global and Chinese markets of bioreactors 2022-2028: Research Report on technology, participants, trends, market size and share
- Unicom Network Management Protocol block diagram
- Example of bit operation (to be continued)
- 大规模实时分位数计算——Quantile Sketches 简史
- d的sha6转大整
- Global and Chinese market for material injection 2022-2028: Research Report on technology, participants, trends, market size and share
- < 山东大学软件学院项目实训 > 渲染引擎系统——基础渲染器(七)
- Batch --03---cmdutil
- Writing code can also be classified as "manual" or "vulgar", and we should be good at finding good hands!
猜你喜欢

Decision tree classification and examples

HEMA is the best representative of future retail

Multimix: small amount of supervision from medical images, interpretable multi task learning

< 山东大学软件学院项目实训 > 渲染引擎系统——基础渲染器(五)

一步步创建包含自定义 Screen 的 ABAP 程序的详细步骤

acwing 798二维差分(差分矩阵)

Redis string type common commands

小程序:如何在插件中获取用户手机号
![Analysis on the current situation of China's antiarrhythmic drug industry in 2021: domestic R & D is further [figure]](/img/48/714f1712f4c2d727dd49cbc6631abf.jpg)
Analysis on the current situation of China's antiarrhythmic drug industry in 2021: domestic R & D is further [figure]

盒马,最能代表未来的零售
随机推荐
面试:为什么整数包装类尽量用equals()来比较大小
Match single character
<山东大学项目实训>渲染引擎系统(二)
C packing and unpacking
Office VR porn, coquettish operation! The father of Microsoft hololens resigns!
Interview: why do integer wrapper classes try to use equals() to compare sizes
读取mhd、raw图像并切片、归一化、保存
一步步创建包含自定义 Screen 的 ABAP 程序的详细步骤
Learning record [email protected] understand canvas
Global and Chinese market of medical ECG telemetry equipment 2022-2028: Research Report on technology, participants, trends, market size and share
Keep an IT training diary 067- good people are grateful, bad people are right
Writing code can also be classified as "manual" or "vulgar", and we should be good at finding good hands!
MYSQL---服务器配置相关问题
What is fintech? How fintech can help small businesses succeed
Acwing high precision multiplication
当编程纳入到高考。。。
<山东大学项目实训>渲染引擎系统(四)
Example of bit operation (to be continued)
Decision tree classification and examples
acwing 802. Interval sum (discretization)