当前位置:网站首页>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
边栏推荐
- Glide usage notes
- Subtotal of constraintlayout
- Comment utiliser le logiciel wangyou DFM pour l'analyse des plaques froides
- json. Stringify() and json The difference between parse () and json Usage of stringify()
- In kotlin?,!,?:,:, - & gt;、== Brief description of symbols
- MFS explanation (VI) -- MFS chunk server installation and configuration
- Jetpack - basic use of room
- ADB shell CMD overlay debugging command facilitates viewing system framework character resource values
- SSM框架整合--->简单后台管理
- 智能文娱稳步发展,景联文科技提供数据采集标注服务
猜你喜欢
Will the chain 2+1 model be a new business outlet and a popular Internet e-commerce market?
Kotlin collaboration channel
Vector control of Brushless DC motor (4): sensorless control based on sliding mode observer
Construction and verification of Alibaba cloud server webrtc system
Jinglianwen Technology: current situation and solutions of data annotation industry
JetPack - - - LifeCycle、ViewModel、LiveData
That is, after the negative impact of gcat advertising e-commerce, is there no stable advertising e-commerce platform?
Data storage in memory (C language)
Ffmpeg compressed video.
In kotlin?,!,?:,:, - & gt;、== Brief description of symbols
随机推荐
Detailed explanation of the player network data reading process of ijkplayer code walkthrough 2
[case] a super easy-to-use tool -- a calculator for programmers
如何使用望友DFM軟件進行冷板分析
What is online blind box e-commerce? Can blind box e-commerce become a new bonus market for the Internet?
Analysis of synchronized
MFS details (vii) - - MFS client and Web Monitoring installation configuration
Session and browser
Kotlin basic objects, classes and interfaces
JNI's bitmap grayscale image (rgba_8888 and rgb_565)
MFS详解(七)——MFS客户端与web监控安装配置
如何使用望友DFM软件进行冷板分析
Will the chain 2+1 model be a new business outlet and a popular Internet e-commerce market?
IIS batch bind domain name
Kotlin collaboration process +flow download case
MFS详解(六)——MFS Chunk Server服务器安装与配置
Jinglianwen technology provides voice data acquisition and labeling services
SSM框架整合--->简单后台管理
Unable to locate program input point getrawinputdevicelist in dynamic link library user32 DLL processing
[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
JS method of extracting numbers from strings