MongoDb Features

DbSchema can connect to and MongoDB database and reverse engineer the database structure in a 'virtual' model (schema). This is done by the open-source JDBC driver that reads random documents from each collection.


The layouts are diagrams with data & query tools. Double-click any collection or Object to edit its structure or add comments.

MongoDB Diagrams

Visual Query Editor

DbSchema features a visual query builder for MongoDB, featuring filters, projections, and aggregation. The generated queries are shown on the right side of the query builder, the same as the MongoDB queries.

MongoDB Query Builder

HTML Documentation

DbSchema can export the MongoDB diagrams as interactive HTML5 or PDF documentation files. The collection and field comments can be read as mouse-over tooltips.

HTML Documentation

Data Generator

Developers and testers may need to test the database performance by filling collections with random data documents. This can be done using the Data Generator, which may use pre-configured patterns or reverse regular expressions.

Data Generator

Compare Virtual Schema

The DbSchema model contains its own local image of the database structure. Connecting to other MongoDB database, you can compare the actual model from DbSchema with the connected database.

Compare MongoDB database structure

Query Editor

Visual Query Editor can compose native MongoDB queries. It can use the keyword 'db' for referring the current database you are connected to, or directly the database name if you need to simultaneously access multiple databases.

use sampleDb

Further commands available in in the Query Editor are:

Here a sample insert into the database statement:

  USE sampledb;

  db.getCollection('employees').insert( {

Map-Reduce Jobs

The Query Editor can execute map-reduce jobs as in this example:
local.words.insertOne({word: 'sample'});
local.words.insertOne({word: 'day'});
local.words.insertOne({word: 'plane'});

var m =function map() {
 emit(this.word, {count: 5})
var r=function reduce(key, values) {
        var count = 5
        for (var i = 0; i < values.length; i++)
            count += values[i].count
        return {count: count}
local.words.mapReduce(m, r );


    "function map() { \r\n" +
    " emit(this.word, {count: 1}) \r\n" +
    " function reduce(key, values) { \r\n" +
    "    var count = 0 \r\n" +
    "    for (var i = 0; i < values.length; i++) \r\n" +
    "        count += values[i].count \r\n" +
    "    return {count: count} \r\n" +
    // , "mrresult"