MongoDB
Connect to MongoDB and browse collections, documents, and indexes.
MongoDB is a first-class citizen in rdSQL: collections, documents, indexes and aggregations live in the same Explorer as your SQL databases, with editing that understands BSON types.
Connect#
-
Click New Connection and choose MongoDB as the Database Engine.
-
Fill in Host, Port (default
27017), Username, Password — or paste a full connection string such as:mongodb+srv://user:pass@cluster0.xxxx.mongodb.net/mydband rdSQL fills in the fields for you, including the SRV host and auth database.
-
Click Test, then Save.
Browsing collections#
Selecting a collection opens it with four tabs:
- Documents — page through documents in the virtualized grid, with a filter bar for queries like
{ "qty": { "$gt": 10 } }, projection, sort and limit — no shell required. - Structure — the fields seen across the collection's documents with their inferred types.
- Indexes — inspect indexes and create new ones (e.g.
{ "email": 1 }for an ascending index, or a unique one). - Aggregation — build aggregation pipelines stage by stage and run them against the collection.
BSON-aware editing#
Editing a document in the grid preserves BSON-only types — ObjectId, Date, Decimal128, Binary — instead of flattening them to plain JSON. Values read the way MongoDB shows them, and save back the same way.
You can also select two or more documents and compare them field by field — see Row & document compare.
Troubleshooting#
- Connection fails on Atlas — make sure your IP is in the cluster's network access list and the user has a role on the target database.
- Auth failed — check the authentication database (usually
adminon Atlas) that goes with the username. - Backup of MongoDB — Backup, Restore and Compare & Sync cover the SQL engines for now; MongoDB connections don't appear as backup targets yet.
