Document stores are growing more and more popular beneath the NoSQL stores. The upside of working with JSON documents and the ease and flexibility of using MongoDB makes it a joy to work with. In this training, you will learn how to design your documents, how to work with MongoDB and how to use MongoDB in Data Science platforms.
For a better understanding of MongoDB, I will go through the most important basics with you. We have a little recap on how relational databases work and what the most relevant tables are. You learn about document stores, how they function and how they differ from relational databases. In this context you also learn about the general structure of a document in MongoDB and how subdocuments are integrated into it.
Development Environment & Data Set
Next, you are going to set up a test environment with a Docker container. You also get a short UI introduction to understand how it works as you can add a UI to MongoDB to actually look into the data and create collections. For all this, we use the Mongo and Mongo-Express images on Dockerhub by creating a Docker compose file. Furthermore, I will explain to you the data set that you are going to use during the course so you understand how it looks and works.
Schema Design MongoDB
Here, you are going to design a schema for your data. You get to know how to query the data and set your indices manually. This way, you learn how to get the schema into MongoDB and why we are using it this way.
Working with MongoDB
Before doing hands-on coding together, I go through some basic CLI commands first, which you can use with your database, your collections or your data for example. Then I will show you how to install pymongo using Windows Subsystem Linux, which is necessary for the next steps, as well as Python.
Then we come to the hands-on coding part, where you learn hands-on how to work with MongoDB. The four main functions that you get to know first are create, read, update and delete (CRUD) documents in MongoDB. You also learn how to add and work with subdocuments and how to write something with arrays of subdocuments. As final background information, I will explain to you the most important operators and how you can work with transactions within MongoDB.
MongoDB in Data Platforms
As a conclusion, I will show you how MongoDB fits into Data Science platforms by going through a common use case. This way, you learn where you can use MongoDB and document stores in your own projects and what you can do with it.
You should have looked into these trainings:
- Data Sources