Database guides

MongoDB

Updated 2026-08-01 · 4 min read

Run any Mongo command from the editor, get nested documents flattened into a grid, and keep the raw JSON one tab away.

AddisDB drives MongoDB through its native driver and maps it onto the same workspace as everything else: collections show up in the sidebar like tables, and results land in the grid with the raw documents one tab away.

Who it is for

MongoDB stores documents rather than rows, so records that vary in shape do not need a migration every time the shape changes. Nested data stays nested instead of being spread across join tables, and horizontal scaling is built in.

The design decision that follows from that is embedding versus referencing: data read together should usually live in the same document, and data that grows without bound should not. A 16 MB document limit is the hard edge, but the practical edge arrives long before it — an array that grows forever will hurt you first.

It fits content and catalog data, event and activity records, user-generated payloads, and any domain where "every record has slightly different fields" is normal rather than a modelling failure.

It is a poor fit when the questions you ask keep spanning collections. Mongo has $lookup, but if half your queries need it, the data was relational all along.

Set up the cluster

  1. On MongoDB Atlas, create a cluster, then open Database Access and create a database user with a password.
  2. Under Network Access, add your current IP address. Atlas blocks everything by default.
  3. Click Connect → Drivers and copy the mongodb+srv:// connection string.
  4. Note which database your user authenticates against — usually admin.
  5. Give the user readAnyDatabase or a read role scoped to the databases you need, plus clusterMonitor if you want the Live Monitor populated.
  6. Local: docker run -p 27017:27017 -d mongo, or brew install mongodb-community.
# A local server in one line
docker run --name mongo -p 27017:27017 -d mongo:7

Connect from AddisDB

  1. New Connection → MongoDB under Document. Port prefills to 27017.
  2. Paste your Atlas connection string into the Connection URL box and click Fill fields, or enter host, port, username and password by hand.
  3. Set Database to the database you want open by default — often admin, where your auth user is defined.
  4. Test, then Save.

An Atlas mongodb+srv:// URL resolves to several hosts through DNS rather than naming one. Paste the whole string and use Fill fields; retyping a single hostname out of it will connect to one node instead of the replica set.

How to query it

The editor accepts Mongo command documents. Typing just a collection name is shorthand for a find against it, so exploring is quick.

// Shorthand — lists documents in the collection
orders

// Or a full command document
{ "find": "orders", "filter": { "status": "shipped" }, "limit": 50 }

// Aggregations work too
{ "aggregate": "orders", "pipeline": [
    { "$group": { "_id": "$status", "n": { "$sum": 1 } } }
  ], "cursor": {} }

Two habits make this pleasant. Sort and project in the command rather than in your head — { "find": "orders", "sort": { "createdAt": -1 }, "projection": { "items": 0 } } is far easier to read in a grid than the whole document. And when a query is slow, add "explain" as its own command to see whether an index was used.

// Did that filter use an index?
{ "explain": { "find": "orders", "filter": { "status": "shipped" } },
  "verbosity": "executionStats" }

What AddisDB gives you

  • Collections in the sidebar, with fields inferred by sampling a document — so you can see the shape of a collection you have never opened.
  • Nested documents flattened into grid columns, with the JSON tab for the untouched original.
  • The Chart view for turning an aggregation result into a visual immediately.
  • ⌘K search across every connected database at once.
  • Read-only enforcement built for Mongo specifically — write commands, and aggregations with a $out or $merge stage, are blocked on a read-only connection.
  • AI chat that knows your collections and their sampled fields.
  • Query tabs and history, so a pipeline you worked out last week is still there.
A MongoDB document shown in the AddisDB JSON result view.

Watching a cluster under load

The monitor lists the operations running right now, with how long each has been going and what it is waiting on. The two things worth looking for are an aggregation that has outlived its usefulness and a collection scan on a collection large enough that it should never happen — both are visible immediately, and cancelling is one click.