Introduction
So far, we have interacted directly with the MongoDB database using the mongo shell. These direct interactions are quick, easy, and a fantastic way to learn or experiment with MongoDB features. However, in many production situations, it will be software that connects with the database in place of the user. MongoDB is a great place to store and query your data, but often, it's most essential use is to serve as a backend for large-scale applications. These applications write, read, and update data programmatically, usually after being triggered by some condition or user interface.
To connect your software with a database, you will typically use a library (often provided by the database creator) known as a driver. This driver will help you connect, analyze, read, and write to your database without having to write multiple lines of code for simple actions. It provides functions and abstractions for common use cases, as well as frameworks for working with data extracted...