Home  >  Article  >  Database  >  Differences between RDBMS and MongoDB

Differences between RDBMS and MongoDB

王林
王林forward
2023-09-14 19:05:10797browse

RDBMS 和 MongoDB 之间的区别

RDBMS

RDBMS stands for Relational Database Management System. It stores data in entity form as tables. It provides multiple layers of information security. Each table may or may not have a primary key (used to uniquely identify records in the table) and foreign keys (used to identify the relationship between the two tables). RDBMS uses SQL language to query the database. Examples of popular RDBMS are oracle, sql server, mysql, etc.

MongoDB

MongoDB is a NoSQL database. It's open source. It is a document-oriented database that uses BSON (the binary version of JSON). BSON is a document storage format. MongoDB stores data in the form of documents and does not use SQL to query the database. It supports distributed servers and provides a rich data model.

tr>
Sr. Number Key RDBMS MongoDB
1 Concept RDBMS is a relational database management system that works on a relational database. MongoDB is a non-relational, document-oriented database management system suitable for document-based databases.
2 Hierarchical It is difficult to store hierarchical data. Has built-in support for storing hierarchical data. Has built-in support for storing hierarchical data. td>
3 Scalability RDBMS is vertically scalable. Performance improves with more RAM. MongoDB can also scale horizontally. Its performance increases with the addition of processors.
4 Schema Schema needs to be defined in the RDBMS before using the database. Schemas can be created and accessed dynamically in MongoDB.
5 SQL injection is vulnerable to SQL injection attacks. SQL injection is not possible.
6 Principles Follow the ACID principles of atomicity, consistency, isolation, and durability. Follow the CAP theorem, consistency, availability and partition tolerance.
7 Basic The database uses Row. The database uses Document.
8 Basic The database uses Column. The database uses Field.
9 Performance RDBMS is slow when processing large hierarchical data. MongoDB is very fast for processing large hierarchical data.
10 Join RDBMS supports complex joins. MongoDB does not support complex joins
11 JavaScript client RDBMS does not provide a JavaScript-based client to query the database . MongoDB provides a Javascript-based client to query the database.
12 Query Language RDBMS uses SQL to query the database. MongoDB uses BSON to query the database.

The above is the detailed content of Differences between RDBMS and MongoDB. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete