MongoDB Documentation, Release 3.0.4 11.2.19 Where can I learn more about data modeling in MongoDB? 11.2.20 Can I manually pad documents to prevent moves during updates? Begin by reading the documents in the Data Models (page 143) section. These documents contain a high level intro- duction to data modeling considerations in addition to practical examples of data models targeted at particular issues. Additionally, consider the following external resources that provide additional examples: Changed in version 3.0.0. An update can cause a document to move on disk if the document grows in size. To minimize document movements, MongoDB uses padding . You should not have to pad manually because by default, MongoDB uses Power of 2 Sized Allocations (page 91) to add padding automatically (page 91). The Power of 2 Sized Allocations (page 91) ensures that MongoDB allocates document space in sizes that are powers of 2, which helps ensure that MongoDB can efficiently reuse free space created by document deletion or relocation as well as reduce the occurrences of reallocations in many cases. However, if you must pad a document manually, you can add a temporary field to the document and then $unset the field, as in the following example. Warning: Do not manually pad documents in a capped collection. Applying manual padding to a document in a capped collection can break replication. Also, the padding is not preserved if you re-sync the MongoDB instance. See also: Record Allocation Strategies (page 91) $^{12}$http://www.mongodb.com/presentations/mongodb-melbourne-2012/schema-design-example $^{13}$http://dmerr.tumblr.com/post/6633338010/schemaless $^{14}$https://docs.mongodb.org/ecosystem/tutorial/model-data-for-ruby-on-rails/ $^{15}$http://github.com/banker/newsmonger/blob/master/app/models/comment.rb $^{16}$http://seancribbs.com/tech/2009/09/28/modeling-a-tree-in-a-document-database 11.2. FAQ: MongoDB for Application Developers 755 var myTempPadding = [ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]; db.myCollection.insert( { _id: 5, paddingField: myTempPadding } ); db.myCollection.update( { _id: 5 }, { $unset: { paddingField: "" } } ) db.myCollection.update( { _id: 5 }, { $set: { realField: "Some text that I might have needed padding for" } } ) • Schema Design by Example 12 • Dynamic Schema Blog Post 13 • MongoDB Data Modeling and Rails 14 • Ruby Example of Materialized Paths 15 • Sean Cribs Blog Post 16 which was the source for much of the data-modeling-trees content.