In this chapter, we are going to introduce a popular NoSQL database called MongoDB. We will learn how well MongoDB suits modern web services by storing documents instead of relations. We'll begin by learning about MongoDB collections and documents and create an example API with MongoDB as the database. While doing so, we'll use a driver package called mongo-driver. Then, we'll try to design a document model schema for a delivery logistics problem.
In this chapter, we are going to discuss the following topics:
- Introduction to MongoDB
- Installing MongoDB and using the shell
- Introducing mongo-driver, an official MongoDB driver for Go
- RESTful API with gorilla/mux and MongoDB
- Boosting querying performance with indexing
- Designing MongoDB documents for delivery logistics