当前位置:网站首页>MongoDB系列之SQL和NoSQL的区别
MongoDB系列之SQL和NoSQL的区别
2022-06-13 06:34: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 等 |
图例来自:https://www.pdai.tech/md/db/nosql-mongo/mongo-x-basic.html
边栏推荐
- RFID process management solution for electroplating fixture
- 'ipconfig' is not an internal or external command, nor is it a runnable program or batch file.
- [virtual machine] VMware virtual machine occupies too much space. Solution
- Error in downloading opencv from pip
- Comment utiliser le logiciel wangyou DFM pour l'analyse des plaques froides
- Comprehensive overview of ijkplayer contour features for ijkplayer code walk through
- MFS详解(五)——MFS元数据日志服务器安装与配置
- Common method of props changing value V-model sync
- MFS詳解(七)——MFS客戶端與web監控安裝配置
- Overview of demoplayer program framework design of ijkplayer
猜你喜欢

Brief introduction to basic usage of echart

Jinglianwen technology provides voice data acquisition and labeling services

Kotlin data flow - flow

15、 IO stream (I)

ML之FE:Vintage曲线/Vintage分析的简介、计算逻辑、案例应用之详细攻略

MFS详解(五)——MFS元数据日志服务器安装与配置

SSM integration

Two uses of bottomsheetbehavior

That is, after the negative impact of gcat advertising e-commerce, is there no stable advertising e-commerce platform?

105. constructing binary trees from preorder and inorder traversal sequences
随机推荐
The causes of font and style enlargement when the applet is horizontal have been solved
Simple use of event bus
Ijkplayer code walk through read_ AV in thread thread_ read_ Detailed explanation of frame() data stream reading process
Differences among concurrent, parallel, serial, synchronous and asynchronous
Common method of props changing value V-model sync
package-lock. json
无刷直流电机矢量控制(四):基于滑模观测器的无传感器控制
数据在内存中的存储(C语言)
Analysis of 43 cases of MATLAB neural network: Chapter 10 classification of discrete Hopfield Neural Network -- evaluation of scientific research ability of colleges and Universities
The new retail market has set off blind box e-commerce. Can the new blind box marketing model bring dividends to businesses?
Use of smalidea
【sketchup 2021】草图大师的图像输出与渲染之样式说明【边线设置、平面设置、背景设置、水印设置、建模设置、天空背景创建天空、利用水印背景创建天空(重要)】
Common websites and tools
Excel data into database
线程相关点
十六、IO流(二)
Failed to extract manifest from apk: processexception:%1 is not a valid Win32 Application.
Custom attribute acquisition of view in applet
YOLOv5解析 | 参数与性能指标
Jetpack - basic use of room