当前位置:网站首页>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
边栏推荐
- JetPack - - -WorkManger
- Ijkplayer code walk through H264 unpacker application details
- 【sketchup 2021】草图大师中CAD文件的导入与建模(利用cad图纸在草图大师中建立立面模型)、草图大师导出成品为dwg格式的二维、三维、立面效果到cad中打开预览】
- That is, after the negative impact of gcat advertising e-commerce, is there no stable advertising e-commerce platform?
- 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
- 机器学习笔记 - 监督学习备忘清单
- [case] a super easy-to-use tool -- a calculator for programmers
- C # mapping from entity class to database (SQLite)
- 【虚拟机】 VMware虚拟机占用空间过大解决
- Multithreading tests network conditions. Machines in different network segments use nbtstat to judge whether they are powered on
猜你喜欢
景联文科技提供语音数据采集标注服务
MFS details (vii) - - MFS client and Web Monitoring installation configuration
如何使用望友DFM软件进行冷板分析
Kotlin collaboration channel
Jinglianwen technology provides voice data acquisition and labeling services
JS case Xiaomi second kill countdown New Year Countdown
Two uses of bottomsheetbehavior
十六、IO流(二)
想进行快速钢网设计,还能保证钢网质量? 来看这里
MFS details (VII) -- MFS client and web monitoring installation configuration
随机推荐
上位机开发(固件下载软件之详细设计)
Kotlin collaboration -- context and exception handling
Ijkplayer compilation process record
Cross process two-way communication using messenger
十五、IO流(一)
Error in downloading opencv from pip
Kotlin collaboration - start and cancel, scope
[SketchUp 2021] sketch master's image output and rendering style description [edge setting, plane setting, background setting, watermark setting, modeling setting, sky background creating sky, creatin
In kotlin?,!,?:,:, - & gt;、== Brief description of symbols
Select all select none JS code implementation
Jfinal uses freemaker to output map.
Kotlin basic string operation, numeric type conversion and standard library functions
Use of smalidea
Smart finance is upgraded again, and jinglianwen technology provides data collection and labeling services
Analyzing server problems using jvisualvm
The new retail market has set off blind box e-commerce. Can the new blind box marketing model bring dividends to businesses?
Outil de formatage du temps - mode. JS (affichage en temps réel du temps Web)
Kotlin data flow - flow
Failed to extract manifest from apk: processexception:%1 is not a valid Win32 Application.
package-lock. json