Database-Specific
Using WhoDB with MongoDB
Using WhoDB with MongoDB
This page covers what is specific to MongoDB when you use it through WhoDB: connecting, browsing collections, and running shell-style commands in the Scratchpad.
Connecting
Select MongoDB on the login page. The form asks for:
- Hostname (required) — you can also paste a full
mongodb://ormongodb+srv://connection URL and WhoDB parses it into the fields. - Username, Password, and Database (optional, depending on your server's auth setup).
Advanced options include:
- Port — defaults to
27017. - URL Params — extra connection-string parameters such as
?authSource=admin. - DNS Enabled (
false) — set totruefor SRV (mongodb+srv) connections such as MongoDB Atlas. - SSL mode — Disabled, Enabled (TLS with certificate verification), or Insecure (TLS without certificate verification).
Tip
For production databases, connect with a read-only user. WhoDB edits documents directly from the grid, so browsing with a read-only user prevents accidental changes.
How WhoDB Presents MongoDB
- Collections are the storage units, scoped to the selected database;
system.*collections are hidden. Views appear read-only, and indexes are listed as metadata. - Documents can be browsed as a grid or as JSON, and edited, inserted, or deleted from the UI.
- Because documents are schema-less, field and type information is sampled from existing documents rather than read from a fixed schema.
WhoDB Features with MongoDB
- Scratchpad — runs shell-style commands like
db.users.find({age: {$gt: 30}}). Supported methods:find,findOne,insertOne,insertMany,updateOne,updateMany,deleteOne,deleteMany,countDocuments,aggregate,distinct,createIndex,drop, anddb.dropDatabase().findresults are capped at 1,000 documents, and aggregation pipelines may not use$where,$function,$accumulator,$out, or$merge. See Scratchpad. - Where conditions — the filter builder offers MongoDB query operators such as
eq,ne,gt,lt,in,exists,regex, andelemMatch. See Where Conditions. - Graph view — relationships between collections are inferred from naming conventions (for example, a
user_idfield pointing atusers), since MongoDB has no declared foreign keys. See Graph View. - Mock data generation — generates documents for collections. See Mock Data.
- Export — CSV, Excel, and additionally NDJSON (JSON Lines), which preserves nested document structure. See Export Options.
Tips
- Prefer NDJSON export when documents contain nested objects or arrays; flat CSV cells stringify them.
- Use a filter in
findor the where-condition builder before browsing very large collections. - Sampled field lists may miss fields that only appear in rare documents — check the JSON view of individual documents when in doubt.
Compatible Databases
FerretDB and Amazon DocumentDB speak the MongoDB wire protocol and appear as their own entries on the login page, with the same collection-based experience in WhoDB.
Further Reading
For index design, replica sets, sharding, and backup guidance, see the official MongoDB documentation.
Related Pages
Previous