{ _id: 1, name: "Grace H." } { _id : 2, "name" : "Ted R." } MongoDB Documentation, Release 3.0.4 The while loop may iterate many times in collections with larger insert volumes. 129 3.4. MongoDB CRUD Reference Write Concern Reference (page 130) Configuration options associated with the guarantee MongoDB provides when reporting on the success of a write operation. SQL to MongoDB Mapping Chart (page 131) An overview of common database operations showing both the Mon- goDB operations and SQL statements. The bios Example Collection (page 137) Sample data for experimenting with MongoDB. insert() , update() and find() pages use the data for some of their examples. 3.4.2 Query and Data Manipulation Collection Methods 3.4.3 MongoDB CRUD Reference Documentation 3.4 MongoDB CRUD Reference 3.4.1 Query Cursor Methods Name Description cursor.count() Returns the total number of documents in a cursor. cursor.explain() Reports on the query execution plan, including index use, for a cursor. cursor.hint() Forces MongoDB to use a specific index for a query. cursor.limit() Constrains the size of a cursor’s result set. cursor.next() Returns the next document in a cursor. cursor.skip() Returns a cursor that begins returning results only after passing or skipping a number of documents. cursor.sort() Returns results ordered according to a sort specification. cursor.toArray() Returns an array that contains all documents returned by the cursor. Name Description db.collection.count() Wraps count to return a count of the number of documents in a collection or matching a query. db.collection.distinct() Returns an array of documents that have distinct values for the specified field. db.collection.find() Performs a query on a collection and returns a cursor object. db.collection.findOne() Performs a query and returns a single document. db.collection.insert() Creates a new document in a collection. db.collection.remove() Deletes documents from a collection. db.collection.save() Provides a wrapper around an insert() and update() to insert new documents. db.collection.update() Modifies a document in a collection.