๐Ÿƒ

MongoDB

MongoDB is a document database maintained by MongoDB Inc. that stores flexible, JSON-like documents instead of rigid rows and columns. It's the sixth most-used database in developer surveys, at roughly 24% usage share. It's especially popular in JavaScript-stack apps โ€” it's the "M" in MERN โ€” because its schema can evolve without formal migrations, which speeds up early-stage development.

Quick facts
Type: Document database (NoSQL)
Made by: MongoDB Inc.
License: Free / open-source, with a paid managed cloud (Atlas)
Hosting: Self-hosted or cloud-managed (MongoDB Atlas)
Primary use case: Flexible-schema apps, especially JS-stack (MERN/MEAN) products
Jump to: ExampleGetting startedBest for

Example

The Mongo shell inserts and queries JSON-like documents directly โ€” no table schema to define up front.

db.users.insertOne({
  name: "Ava Chen",
  age: 27,
  tags: ["admin", "beta_tester"]
});

// find users over 21, sorted by name
db.users.find({ age: { $gt: 21 } })
  .sort({ name: 1 });

Getting started

Run a local instance with Docker, then connect with the mongosh shell.

# Docker: run a local MongoDB instance
docker run --name mongo -p 27017:27017 -d mongo:7

# connect with the mongosh shell
mongosh "mongodb://localhost:27017"
Best for: Products with fast-changing data shapes โ€” content platforms, catalogs, user-generated content โ€” especially JavaScript/Node.js stacks where working with JSON-like documents end-to-end avoids an object-relational mapping layer.