How to Browse and Query MongoDB from an All-in-One Desktop Toolkit
Connect to a MongoDB database, browse collections, run queries, and inspect documents from your desktop with the built-in NoSQL client in MyDevTools. Learn the basics of NoSQL document querying.
Get the tool mentioned in this guide in the desktop app:Database Explorer
What is a NoSQL database browser?
A NoSQL database browser is a GUI that lets you connect to a document database (like MongoDB), explore its structure, and run queries.
For MongoDB specifically, the traditional options are the mongo shell, MongoDB Compass (a single-purpose desktop app), or Atlas UI (cloud-only). A NoSQL explorer bundled into an all-in-one desktop toolkit is useful when you want database browsing alongside your other developer tools, connecting to a shared staging database, or debugging a quick data issue during development — without installing yet another standalone client.
MongoDB data model: databases, collections, documents
MongoDB organizes data in three layers:
Database — Top-level container, similar to a database in SQL. One MongoDB server hosts multiple databases.
Collection — Equivalent to a SQL table. A database holds multiple collections. Collections do not enforce a schema by default.
Document — The actual data record, stored as BSON (Binary JSON). Documents in the same collection can have different fields. Each document has an auto-generated _id field (ObjectId) that acts as the primary key.
// Example MongoDB document
{
"_id": { "$oid": "507f1f77bcf86cd799439011" },
"username": "alice",
"email": "[email protected]",
"roles": ["admin", "editor"],
"createdAt": { "$date": "2024-01-15T10:30:00Z" },
"profile": {
"firstName": "Alice",
"lastName": "Smith"
}
}Basic MongoDB query syntax
MongoDB queries use a JSON-like filter syntax. The find() method accepts a filter object and an optional projection.
// Find all documents in a collection
db.users.find({})
// Find by exact match
db.users.find({ "username": "alice" })
// Find with comparison operators
db.users.find({ "age": { "$gt": 18 } }) // greater than
db.users.find({ "score": { "$gte": 90, "$lte": 100 } }) // between
// Find where array field contains a value
db.users.find({ "roles": "admin" })
// Projection: return only specific fields (1=include, 0=exclude)
db.users.find({ "active": true }, { "username": 1, "email": 1, "_id": 0 })
// Limit and sort
db.users.find({}).sort({ "createdAt": -1 }).limit(10)MongoDB query operators cheat sheet
Comparison: $eq, $ne, $gt, $gte, $lt, $lte
Array: $in, $nin, $all, $elemMatch, $size
Logical: $and, $or, $not, $nor
Element: $exists, $type
Text: $regex for pattern matching
Update: $set, $unset, $push, $pull, $inc, $addToSet
// $in: match any value in array
db.users.find({ "status": { "$in": ["active", "pending"] } })
// $exists: only return documents that have the field
db.users.find({ "phone": { "$exists": true } })
// $regex: pattern match (slow without index)
db.users.find({ "email": { "$regex": "@example.com$" } })
// $and: multiple conditions
db.users.find({
"$and": [
{ "age": { "$gte": 18 } },
{ "active": true }
]
})Connecting to MongoDB securely
Always use connection strings with authentication. MongoDB connection strings follow the format:
mongodb://username:password@host:27017/dbname
Or with SRV (Atlas/cloud):
mongodb+srv://username:[email protected]/dbname
For the NoSQL Explorer in MyDevTools, the desktop app connects to MongoDB directly from your machine, so your connection string and credentials stay local. Only connect to databases you own or have explicit authorization to access.
// Standard connection string
mongodb://admin:secretpassword@localhost:27017/myapp
// MongoDB Atlas (cloud)
mongodb+srv://user:[email protected]/myapp
// With options
mongodb://user:pass@host:27017/db?authSource=admin&ssl=trueFrequently asked questions
Is it safe to use a desktop MongoDB client?
Use one that connects directly from your machine and keeps credentials local. The MyDevTools NoSQL Explorer is a desktop app that connects to MongoDB locally — your connection string stays on your device rather than passing through a third-party server.
What is the difference between MongoDB and SQL databases?
SQL databases use tables with a fixed schema, rows, and columns. MongoDB stores flexible JSON-like documents in collections with no enforced schema. SQL uses JOIN for relations; MongoDB typically embeds related data in the document or uses application-level references.
How do I run an aggregation pipeline in a desktop MongoDB client?
An aggregation pipeline is a series of stages ($match, $group, $sort, $project, $lookup) that transform documents. In a client that supports raw query input, you can enter the pipeline array directly.
Does MongoDB have transactions?
Yes, since MongoDB 4.0. Multi-document transactions work across collections and databases in replica sets. However, for many use cases, embedding related data in a single document avoids the need for transactions.

