Two Tools To Elevate Your MongoDB Experience
Written by Nikos Vaggalis   
Thursday, 03 July 2025

The tools contradict each other; the first one allows you to write SQL instead of using Mongo's special syntax, while the other allows you to manipulate the database without having to write SQL and by just employing natural language.

The first one, Queryleaf, translates SQL queries into MongoDB commands. It parses SQL using node-sql-parser,
transforms it into an abstract command set, and then executes those commands against the MongoDB Node.js driver .

It supports both simple SQL statements like insert, update, select and delete, but can also do more advanced querying, such as handling nested field access, arrays, aggregates, etc.

So for instance the following MongoDB query:

db.collection('users').find(
{ age: { $gt: 21 } },
{ name: 1, email: 1 }
)

Will be translated into SQL as:

SELECT name, email FROM users WHERE age > 21

So far so good, but the real magic takes place when accessing nested field with SQL only:

MongoDB:

db.collection('users').find(
{ 'address.city': 'New York' },
{ name: 1, 'address.city': 1, 'address.zip': 1 }
)

SQL:

SELECT name, address.city, address.zip FROM users WHERE address.city = 'New York'

Note that Queryleaf is multifaced. It's a library, as such it can be called from your code, it's avalable as a CLI for doing command-line SQL queries, a Web Server for REST API access and a PostgreSQL Wire Protocol Server for connecting with standard PostgreSQL clients.

The lesson here, you can never rule SQL out. But while the push of SQL as a universal protocol that unifies access to all kinds of services and from all kind of tools, as we examined in "Tailpipe - The Log Interrogation Game Changer" where SQL was used to manipulate access logs, the new counterpart of the Agentic era is challenging that position. Which brings us to the other tool ScoutDB, an Agentic Mongo GUI.

With ScoutDB, Instead of writing queries in Mongodb syntax or SQL, you simply describe what you’re looking for in plain English and let it be translated into MongoDB queries. That way you eliminate the need to remember the exact syntax of collections and structures.

Of course as in other text-to-SQL tools, it first needs to understand your database schema in order to infer the correct queries. For that reason, ScoutDB automatically maps the relationships between your collections, understanding how your data interconnects even when those relationships aren’t explicitly defined in your schema.

So which option will you go for? If you are a developer who knows his way around his database schema, uses SQL, can write optimal queries and at the same time doesn't want to learn the MongoDB native query syntax, then Queryleaf is for you. Plus it's free and open source.

If on the other hand you are an Enterprise user who wants to write a report the easiest way possible, then Scout DB is for you. I'm emphasizing "Enterprise" user because the tool is not free, with the pricing scheme TBA. That, however, doesn't rule out a  potential free plan.

More Information

Queryleaf

ScoutDB

Related Articles

Tailpipe - The Log Interrogation Game Changer

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Why Drone Shows Are Booming
04/07/2025

What do you need to make a celebration noteworthy? You may automatically think fireworks, especially for Independence Day, but an increasing number of celebrations are turning to drone shows instead.& [ ... ]



Ktor 3.2 Adds HTMX Support
26/06/2025

Ktor 3.2 has been released with new modules for dependency injection and HTMX. This version also adds support for Gradle version catalogs. 


More News

pico book

 

Comments




or email your comment to: comments@i-programmer.info