MongoDB nosql database basics

5 min readOct 13, 2022

We write informational, educational, non-production tutorials for data scientists, data engineers, machine learning engineers. Web development and nosql database knowledge and skills are useful even for engineers who don’t immediately see these skills as useful. They are great for startups, hackathons, quickly prototype products, iterating on product / feature ideas. One thing about MongoDB nosql database is that it’s extremely flexible : there’s no need to define a schema right away (not in the strict sense of a SQL database), it’s possible to add more attributes later, it can be easily served on the internet, in the cloud.

This tutorial will give an introductory talk about MongoDB how to get started, what are some of the basics, how to do the essential create read update delete (CRUD).

Getting started with MongoDB

MongoDB is a modern nosql alternative to SQL databases like MySQL and Postgresql. MongoDB can be used as the data access layer, data storage layer, data storage backend for modern applications. It is a document store. Data is stored in JSON-like documents {} in collections. Database has collections > collections has field:value key:value pairs.

Read our flash card about databases, on our website
Databases, SQL, nosql, graph database [public]

Let’s discuss the important Create Read Update Delete (CRUD) basics of MongoDB in this tutorial.

As always, our tutorials are for educational informational purpose only, NOT for production/commercial use.

Introduction to MongoDB

The data is stored in JSON like documents made of key value pairs.

_id primary key. MongoDB allows developers to look up a document in document store database by an unique ID.

An example data entry (JSON document) in a collection. There are special type variables like $oid $date preceded with a dollar sign.

"_id": {
"$oid": "6329a07eac7349e55d944107"
"amount": 35,
"type_accounting": "supply",
"current_inventory": 0,
"inventory_date": {
"$date": {