Databases and storage · Database

MongoDB

A popular document database that stores each record as a JSON-like document instead of a row in a table.

Document and key-value · Free tier · updated

How it works

In MongoDB a collection holds documents (stored as BSON, a binary form of JSON), and each document can contain nested objects and lists. A customer can carry their addresses inside the same document, so reading them needs no join. Queries, indexes and aggregation pipelines work on those document fields.

Documents in one collection do not have to share a shape, which makes early development quick. Multi-document transactions exist, but the design pushes you to keep related data together. MongoDB Atlas is the company's managed cloud; the Community Server is free to run yourself under the SSPL licence.

MongoDB pros and cons

Pros

  • Flexible documents fit data that is naturally nested
  • Quick to start, with no schema to design up front
  • Scales across machines with sharding
  • Atlas adds hosted search, vector search and backups

Cons

  • Without schema validation, inconsistent data creeps in
  • Joining collections is clumsier than SQL joins
  • The SSPL licence is not accepted as open source by everyone

When to use MongoDB

Pick it when

  • Content, catalogues or event data with varied, nested shapes
  • A JavaScript team that wants to think in JSON end to end

Skip it when

  • Highly relational data (orders, invoices, stock) that must stay consistent
  • You want standard SQL and its tooling

MongoDB pricing

Free tier

Community Server is free. MongoDB Atlas has a free 512 MB cluster, Flex clusters from about $8 a month (capped at $30), and dedicated clusters from roughly $60 a month.

MongoDB pricing page (opens in a new tab)Approximate, checked September 2026.What the other tools cost

MongoDB vs the alternatives

More in Databases and storage

Document and key-value

All 25 Databases and storage terms

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.