1. Course Outline
This course focuses on the content of the MongoDB data update, including the insertion of the Insert function, the removal of the Remove function from the document, and the basic use of the update function for document updates. In addition, MongoDB's writing security mechanism, batch write bulk function and so on are introduced.
- MongoDB Document Insertion and deletion
- MongoDB Document Modification
- MongoDB's write security mechanism
2. Course Introduction
This lesson, first of all, will be a brief introduction to the MongoDB Data update, and then introduce the document Insert function Insert, the document's Bulk update function Bulk, and the document deletion function remove use, and finally will briefly explain the MMAPV1 storage engine memory allocation policy. Data operation of the database is divided into two main categories: Data update and data query, this lesson mainly explains MongoDB data update, in the next lesson will introduce MongoDB data query.
MongoDB uses the MMAPV1 storage engine by default, which stores records on disk in the order in which they are written. For the MMAPV1 storage engine, if an update operation exceeds the space currently allocated on disk, MongoDB will re-allocate a larger contiguous space on disk, and then copy the original data into the newly allocated memory, and the whole process will take a lot of time. In particular, the set of indexes created will take more time. Because if a collection is indexed, the corresponding index content must be updated while the data is being copied. Therefore, in a collection with multiple indexes, it is very time-consuming to reallocate memory frequently, which can seriously reduce the write efficiency of the system.
3. Detailed Course Video
Video course links are as follows: MongoDB Data update
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Lesson three MongoDB Data update