MongoDB is a NoSQL database that stores data in flexible, JSON-like documents.

Start MongoDB Server

mongosh

<aside> 💡 MongoDB strings are case sensitive

</aside>

Show All Databases

show databases
show dbs

Switching/Creating Databases

Syntax:

use <database-name>

use dataBaseName

Delete Database

  1. First Switch to the database that you want to delete

    use dataBaseName
    
  2. Drop the database

    db.dropDatabase()
    

Collections in MongoDB

Create Collections

Syntax: