Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
MongoDB’s JavaScript shell makes it easy to play with data and get a tangible sense for documents, collections, and the database’s particular query language. Think of the following walkthrough as a practical introduction to MongoDB.
We’ll begin by getting the shell up and running. Then we’ll look at how JavaScript represents documents, and you’ll learn how to insert these documents into a MongoDB collection. To verify these inserts, you’ll practice querying the collection. Then it’s on to updates. Finally, you’ll learn how to clear and drop collections.