From the course: MongoDB Essential Training
Unlock the full course today
Join today to access over 23,400 courses taught by industry experts.
insertOne and insertMany - MongoDB Tutorial
From the course: MongoDB Essential Training
insertOne and insertMany
- [Instructor] You've already used the insert commands, but there are some options that we didn't cover that we're going to cover now. To briefly recap, you can insert a document like this, and you can insert many documents at once inside an array like this. When inserting data into a database, a concept that you should be aware of is durability. Durability is a property that guarantees that acknowledged writes are permanently stored in the database, even if the database or parts thereof become temporarily unavailable. In MongoDB, you can configure the level of durability. You can choose to have high durability, but then writes will be slower, or you can choose to have low durability, but faster writes. The way you configured durability in MongoDB is by specifying a writeConcern. The writeConcern defines what MongoDB needs to do before a write is considered successful. You can specify the writeConcern as the second…
Contents
-
-
-
-
-
-
(Locked)
insertOne and insertMany4m 58s
-
(Locked)
findOne and find7m 49s
-
(Locked)
Comparison operators6m 11s
-
(Locked)
Logical operators7m 55s
-
(Locked)
Sort, skip, limit4m 8s
-
(Locked)
updateOne and updateMany4m 36s
-
(Locked)
Arrays10m 2s
-
(Locked)
Transactions5m 2s
-
(Locked)
$expr5m 28s
-
(Locked)
Challenge: Create app1m 22s
-
(Locked)
Solution: Create app6m
-
(Locked)
-
-
-
-