Chapter 1, Introducing MongoDB, discusses NoSQL, provides an overview of MongoDB, and ends by covering detailed installation procedures for Windows as well as various forms of Linux servers. Also covered in this chapter, in addition to a discussion of the benefits of using MongoDB, are big picture questions including what is it and why use it.
Chapter 2, Understanding MongoDB Data Structures, covers foundational aspects of MongoDB database design, including documents, fields, and collections. Comparisons are drawn between SQL and MongoDB terminology. At the end of this chapter, you will learn how to create a MongoDB database.
Chapter 3, Using the Mongo Shell, of especial interest to DBAs, covers how to use the mongo shell to connect to a MongoDB database and perform CRUD (Create, Read, Update and Delete) operations. Plenty of JavaScript examples are provided.
Chapter 4, Developing with Program Language Drivers, goes through how to access a MongoDB database using PHP. Up until this point, examples are using JavaScript. In this chapter, the focus shifts to programming language driver access. This chapter will be of great interest to developers. Even if your main language is not PHP, the examples can be easily understood.
Chapter 5, Building Complex Queries Using Aggregation, addresses complex queries. The focus of this chapter will be on a feature unique to MongoDB called aggregation. This facility allows database developers or DBAs to return subsets of data grouped, sorted and filtered, running through a multi-stage pipeline. Plenty of JavaScript examples are provided.
Chapter 6, Maintaining MongoDB Performance, focuses on performance features such as indexing and sharded clusters. In addition, there is a substantial discussion on backup, restore, and replication. Solid working examples are shown, providing detailed steps that show you how to create a replica set as well as a sharded cluster.
Chapter 7, Securing MongoDB, shows how to secure the database itself, add users, and adjust permissions to specific collections. You will also learn how to enforce authentication and create an admin user. In addition, we address how to configure MongoDB to use SSL/TLS using x.509 certificates.
Chapter 8, Getting from Web Form to MongoDB, presents an end-to-end example using the PHP language driver. You will see how data posted from a web form is added to the database over a secure communications link, with security enabled. After that, you will see how a simple query is implemented showing the new entry. In addition, this chapter shows how to launch AJAX requests and have MongoDB respond using PHP.