MongoDB与SQL数据库

It is a well known fact that SQL databases have ruled the world of data technologies and have been the primary source of data storage for over 4 decades. Generally the SQL databases are used, mainly for accessing relational databases.

众所周知,SQL数据库已经统治了数据技术的世界,并且在过去的40多年中一直是数据存储的主要来源。 通常,使用SQL数据库,主要用于访问关系数据库。

Oracle and Microsoft SQL Server ruled the segment, but as the Web development market paced up, there came a shift towards usage of open source databases like MySQL, Postgres etc. But RDBMS was still the first choice.

OracleMicrosoft SQL Server统治了这一领域,但是随着Web开发市场的发展,人们开始转向使用MySQLPostgres等开源数据库。但是RDBMS仍然是首选。

Soon enough data started growing exponentially and scalability became a major issue, at that time NoSQL rolled in to save the day.

很快,足够的数据开始呈指数级增长,而可伸缩性成为一个主要问题,当时NoSQL投入使用以节省时间。

One of the cool facts about NoSQL databases is that they existed since 1960, but in the recent times they have gained more popularity especially for the scaling feature provided by the same.

关于NoSQL数据库的一个很酷的事实是,它们自1960年以来就存在,但是在最近一段时间,它们已经获得了越来越多的普及,特别是因为它们提供的扩展功能。

The major difference between MongoDB and SQL Databases is the way they handle data. In SQL databases, data is stored in form of traditional 2 dimensional row-column structure while in MongoDB rich data document model is followed, which allows storage of any type of data.

MongoDB和SQL数据库之间的主要区别在于它们处理数据的方式。 在SQL数据库中,数据以传统的二维行-列结构的形式存储,而在MongoDB中,则遵循丰富的数据文档模型,该模型允许存储任何类型的数据。

Let us see some of the key differences between MongoDB and other SQL databases :

让我们看看MongoDB与其他SQL数据库之间的一些主要区别:

SQL DatabaseNoSQL Database (MongoDB)
Relational databaseNon-relational database
Supports SQL query languageSupports JSON query language
Table basedCollection based and key-value pair
Row basedDocument based
Column basedField based
Support foreign keyNo support for foreign key
Support for triggersNo Support for triggers
Contains schema which is predefinedContains dynamic schema
Not fit for hierarchical data storageBest fit for hierarchical data storage
Vertically scalable - increasing RAMHorizontally scalable - add more servers
Emphasizes on ACID properties (Atomicity, Consistency, Isolation and Durability)Emphasizes on CAP theorem (Consistency, Availability and Partition tolerance)
SQL数据库 NoSQL数据库(MongoDB)
关系型数据库 非关系数据库
支持SQL查询语言 支持JSON查询语言
基于表格 基于集合和键值对
基于行 基于文件
基于列 基于领域
支持外键 不支持外键
支持触发器 不支持触发器
包含预定义的架构 包含动态架构
不适合分层数据存储 最适合分层数据存储
垂直可扩展-增加RAM 水平可扩展-添加更多服务器
强调ACID属性(原子性,一致性,隔离性和耐久性) 强调CAP定理(一致性,可用性和分区容限)

MongoDB Documents also align with the structure of objects in modern programming languages, as they are a form of JSON. This makes it easy for developers to map the data used in the application to its associated document in the database. While in SQL Database, creating a table with columns mapped to the attributes of an object in programming language, appears a little tedious.

MongoDB文档也是JSON的一种形式,因此也符合现代编程语言中对象的结构。 这使开发人员可以轻松地将应用程序中使用的数据映射到数据库中与其关联的文档。 在SQL数据库中时,用编程语言创建具有映射到对象属性的列的表显得有些乏味。

翻译自: https://www.studytonight.com/mongodb/mongodb-vs-rdbms

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值