O'Reilly logo

MongoDB Data Modeling by Wilson da Rocha França

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introducing the write operations

In MongoDB, we have three kinds of write operations: insert, update, and remove. To run these operations, MongoDB provides three interfaces: db.document.insert, db.document.update, and db.document.remove. The write operations in MongoDB are targeted to a specific collection and are atomic on the level of a single document.

The write operations are as important as the read operations when we are modeling documents in MongoDB. The atomicity in a level of a single document can determine whether we embed documents or not. We will go into this in a little more detail in Chapter 7, Scaling, but the activity of choosing a shard key will be decisive in whether we write an operation's performance because, depending on the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required