Database Reference
In-Depth Information
Chapter 4
MongoDB Functionality
Now that you know the basic set of MongoDB objects, let's discuss what you can do with
them through MongoDB functionality. We'll provide an overview to the four most common
functions (adding, querying, updating, and deleting) as well as related operators. Because
this is a book on how to do data modeling for MongoDB databases, and not a book on how
to use MongoDB, we cover core functionality, but leave it to the MongoDB user guide and
other resources on the market to cover the more advanced functionality (see Appendix B for
a full list of MongoDB references).
A DDING D ATA IN M ONGO DB
The insert( ) function adds a document or an array of documents to a collection. The general
structure for an insert( ) statement is:
Search WWH ::




Custom Search