www.mongodb.com/compare/mongodb-mysql
Comparing the Differences - MongoDB vs MySQL
Understand the differences between MongoDB and MySQL, the scalability and security options for each offering, and which database to use when.
www.mongodb.com
MongoDB vs MySQL Security
MongoDB leverages the popular role-based access control model with a flexible set of permissions. Users are assigned to a role, and that role grants them specific permissions over data sets and database operations. All communication is encrypted with TLS, and it’s possible to write encrypted documents to MongoDB data collections using a master key which is never available to MongoDB, achieving encryption of data at rest.
MySQL supports the same encryption features as MongoDB; its authentication model is also similar. Users can be granted roles but also privileges, giving them permissions over particular database operations and against particular data sets.
MongoDB vs MySQL Performance
Assessing the performance of two completely different database systems is very difficult, since both management systems approach the task for data storage and retrieval in completely different ways. While it’s possible to directly compare two SQL databases with a set of standard SQL benchmarks, achieving the same across non-relational and relational databases is much more difficult and subjective.
For example: MySQL is optimized for high performance joins across multiple tables that have been appropriately indexed. In MongoDB, joins are supported with the $lookup operation, but they are less needed due to the way MongoDB documents tend to be used; they follow a hierarchical data model and keep most of the data in one document, therefore eliminating the need for joins across multiple documents.
MongoDB is also optimized for write performance, and features a specific insertMany() API for rapidly inserting data, prioritizing speed over transaction safety wherein MySQL data needs to be inserted row by row.
Observing some of the high-level query behaviors of the two systems, we can see that MySQL is faster at selecting a large number of records, while MongoDB is significantly faster at inserting or updating a large number of records.
'Web > 자료' 카테고리의 다른 글
AWS S3 에서 호스팅한 정적 웹에 HTTPS 적용하기 (0) | 2021.11.12 |
---|---|
front 유용한 사이트들 (0) | 2021.04.08 |
프론트엔드 개발자 인터뷰 후기 (면접 질문 정리) (0) | 2021.04.02 |
인텔리제이 단축키 정리 (0) | 2021.03.14 |
REST Resource Naming Guide (0) | 2021.03.10 |