MongoDB for Jobseekers by Justin Jenkins
Chapter 1: Why MongoDB? – This chapter will start off with a brief history of databases, and how MongoDB and its Document Modal are different, as well as how these differences make it so powerful and popular.
Chapter 2: MongoDB Jobs and Roles – This chapter is dedicated to providing some context and explanation of different job roles available to those with MongoDB experience as well as what sections of this book you might want to pay particular attention to, based on each particular job role.
Chapter 3: Getting Started – In this chapter, we will cover installing MongoDB Server on various different operating systems, as well as Docker and MongoDB’s Cloud service Atlas. Additionally, we will walk through installing the MongoDB Shell, Tools and the official GUI MongoDB Compass.
Chapter 4: A Better Way to Store Data – Documents – In this chapter, we will cover some key details about Documents, rules you should know, and most importantly, some examples of real-life data put into Documents that will help you understand how you might put your own data into Documents.
Chapter 5: Let’s Do It – Create, Update and Delete Documents – By the end of this chapter, you will have a basic idea of how to create, update and delete documents within MongoDB. We will also discuss how to do each of these actions to multiple documents at one time.
Chapter 6: Getting What You Want – Querying – By the end of this chapter, you should be comfortable with querying MongoDB using various query operators, have an understanding of the core concepts of querying with MongoDB, as well as tools that you can use to deal with unique challenges such as case sensitively in MongoDB.
Chapter 7: Complex Data, Made Simple – MongoDB’s document model allows us to store much more complex data than legacy databases, by using arrays and embedded documents. These data types give us a lot of flexibility, but with flexibility can come complexity. Fortunately, the MongoDB Query API provides robust tools for dealing with these complex types. By the end of this chapter, you should have a solid understanding of how to perform typical queries to find and modify arrays as well as embedded objects. Additionally, you will have a high-level understanding of the many MongoDB operators available for these data types, and how to use them.
Chapter 8: The MongoDB Aggregation Framework – For more complex cases, MongoDB offers what is called the Aggregation Framework, which allows a structured way to formulate a series of steps, called a “pipeline”, to get back just the data you need. In this chapter, we will discuss this framework and dive into some examples of its use. Covering the Aggregation Framework in-depth is beyond the scope of this book. However, by the end of this chapter, you should have a solid idea of how the framework works and how you can use it to fit your needs.
Chapter 9: Planning for Performance – Collections and Indexes – In this chapter, we will explain what an index is, how MongoDB uses indexes, different index types, different collection types, and how to create, configure and delete indexes and collections. By the end of this chapter, you should have a solid foundation of indexing and collection options in MongoDB and lots of areas you can look further into, if you want to learn more.
Chapter 10: Getting In and Getting Out – Data Migration – By the end of this chapter, you should feel comfortable with importing and exporting in MongoDB using MongoDB Compass, MongoDB Database Tools as well as scripting methods. Additionally, you will have a good idea of how to transfer data between collections and databases.
Chapter 11: Make It Great – Configuration and Monitoring – In this chapter, we will consider how the server’s start, stop and restart processes work, as well as how to configure your server. We will focus on important settings you will need to know, to properly administrate your server, as well as various monitoring tools and tips for troubleshooting.
Chapter 12: Seamless Scaling – Replication and Sharding – In this chapter, we will cover the core concepts of replication in MongoDB, discussing how to setup a replica set and how to leverage the concept of “sharding” for horizontal scaling using MongoDB. By the end of this chapter, you should be comfortable setting up a basic replica set and have a knowledge of how to administrate that replica set. You will also have a solid idea of how sharding works in MongoDB and how and why you would use it for your application.
Chapter 13: Being Proactive – Security and Backups – In this chapter, we will begin by discussing how to protect your database via authentication, authorization and roles. Then we will transition to how to effectively backup and restore your databases, wrapping up with a brief discussion about database encryption.
Chapter 14: Making Stuff – Programming with MongoDB – By the end of this chapter, you should have a solid idea of how to connect and perform basic queries against MongoDB, using code written in Python, Node.JS (JavaScript) and PHP.
Make sure to see the section about the book’s free GitHub Codespace, where you can try some of this code out for yourself, without installing anything locally.
Chapter 15: Tools for Success – MongoDB Shell and Compass UI – In this chapter, we will dig a bit deeper into some of the most useful and common tools you will use with MongoDB. We will learn how to configure and personalize the MongoDB Shell, mongosh, as well as how to create useful custom functions you can use within the shell. Then, we will explore the MongoDB Visual Studio Code extension, and MongoDB Playgrounds. Lastly, we will do a bit of a review, as well as a more expansive investigation of MongoDB Compass, the official GUI for MongoDB. By the end of this chapter, you should be empowered to take your use of all these tools to the next level.
Chapter 16: Cloud Services – MongoDB Atlas – This chapter will only briefly cover a couple of the key aspects of the cloud services offered by MongoDB Atlas, as indeed, a whole book in itself could be written about Atlas. With that said, after reading this chapter, you should have a solid understanding of what Atlas has to offer and how you can use it to leverage the power of MongoDB even further. Atlas has essentially three main categories of features, two of which we will talk about in this chapter: cloud hosting services and database tools, such as Search and Charts. In the next chapter, we will discuss the third category, Atlas Application Services.
Chapter 17: MongoDB Atlas – Application Services – We will be building a React app using Atlas App Services which allows us to build on top of MongoDB, without actually having to run or maintain our own Replica Set, or server. Rather, we will rely on a shared free MongoDB Cluster, Atlas Functions, the Realm SDK for Web and the Atlas’ Data API.
Chapter 18: Jobseeker – Interview Prep – This chapter will present fifty different interview-like questions, at various levels of difficulty, as well as a response. These may not be the exact questions you would be asked in an interview, for which MongoDB skills are required, but you can expect to be asked some variation of them. For each question, a response is offered, as well as a reference to the chapter we discussed the topic in general, or directly. We will discuss how to use this chapter’s questions in the next section.
Chapter 19: Conclusion – In this final chapter, we will briefly touch on a few more complex topics such as Change Streams, Transactions in MongoDB, GridFS for storing large files and some comparisons between SQL queries and their MongoDB equivalents.