Udemy

Shell vs Drivers

A free video tutorial from Academind by Maximilian Schwarzmüller
Online Education
Rating: 4.6 out of 5Instructor rating
51 courses
3,578,718 students
Shell vs Drivers

Lecture description

When it comes to connecting to a MongoDB database, you got various options, most importantly: The local shell or drivers for different programming languages. Let me explain the differences.

Learn more from the full course

MongoDB - The Complete Developer's Guide

Master MongoDB Development for Web & Mobile Apps. CRUD Operations, Indexes, Aggregation Framework - All about MongoDB!

17:29:23 of on-demand video • Updated January 2026

Learn what document databases are and how data is organized with MongoDB
Learn how to perform CRUD operations with MongoDB
Don't stop at the basics - learn all about writing complex MongoDB queries, in-depth and with practical examples!
Write efficient and well-performing queries to fetch data in the format you need it
Use all features MongoDB offers you to work with data efficiently
English [CC]
-: So for this course, we will primarily work in the Shell to see all the commands and the different ways of using these commands, because the Shell is a great neutral ground for working with MongoDB because I don't know if you're building a PHP, a node, a C++. a Python. or whatever application, and I want to teach you something which you can apply to all use cases, and that is the case with the Shell. But of course, in the end, you will build an application with a programming language where this app should then issue these commands against the MongoDB server. And for that you can click on Docs on the official page, and then on the doc page, click on MongoDB drivers. Because these drivers are packages you install for the different programming languages your app might be written in. As you see, you've got drivers for all kinds of languages, and these drivers are then your bridges between your programming language and the MongoDB server. And as it turns out, in these drivers, you use the same commands as I use in the Shell, just adjusted to the syntax of the language you're working with, of course. So for example, if we have a look at the node JS driver and the Python driver, let's see how we would work with those. On the node JS driver documentation, if we click on latest documentation, we can quickly have a look at the quick start guide to see how our code would look like. If we use that you see how to start your MongoDB database and so on. And what you will see there is that here you also in the end just reach out to a database. Then instead of typing the collection name, you have a collection method to get access. But you would look into the official docs, of course, when using the driver. So these are tiny differences which you quickly find out there. But then on the collection, you again run insert many, we haven't seen that yet. We'll see it in the course. This exists in the Shell in exactly the same way. And you insert data in exactly the same way. So this, the core features are exactly equal. Let's all have a look at Python to prove that. Here I'm on the Python driver page. Now let me quickly dive into the tutorial so that we see some code for that. So here you see for Python, you would install a package called PyMongo, which is the official driver for Python. You then connect and so on. And again, you in the end just get access to a database, then to a collection here again by just using that collection name. And then you simply insert_one now using Python syntax where you happen to write methods like this with an underscore and this snake case. But then you insert_one(post), which is just such an object, a Python map in the end. So you see the syntex of the languages obviously differs because, well, there are different languages, but the general way of working with your data does not change at all. You work in exactly the same way as in the Shell. And actually this is something we'll build later in the course. This is a complete node application using MongoDB. And here you also see some code in action where I insert a new product and this is something we'll build in the course so that I can teach you how to move from the shell to the drivers. But I hope this makes clear why we work with the shell. It's the neutral ground on which we all can agree, so that you can take that knowledge on how to insert, how to configure your inserts, how to query data, how to filter data, how to sort data so that you can use the knowledge with any driver you want, and you are really flexible regarding what you build.