Taking a Look at Robomongo and Studio 3T with Compose for MongoDB


With two of the best known MongoDB desktop UI's now under one roof, we decided to take a look at who should be using either of them - and how well they work with Compose.

While Compose has a useful web browser for MongoDB to complement the Mongo shell, there's a whole class of desktop tools which offer different ways to access MongoDB with a native experience. One, Robomongo, we looked at it a few years back. Since then, after stalling for a while, the developers pushed forward to get a version 1.0 out. They then announced they'd been acquired by 3T, the maker of commercial MongoDB desktop formerly known as MongoChef and now known as Studio 3T.

Since the release of Robomongo 1.0 and its aquisition by Studio 3T (formerly MongoChef), we've been interested in looking at some of its developments and how Robomongo and Studio 3T compare. Although Robomongo has made a lot of progress since we reviewed it a few years ago, we decided to review some of the main differences between Robomongo 1.0 and Studio 3T so that you can decide which one will fit your development needs.

With both desktop UIs under the same roof, the question we heard being asked was what's the difference between them and which one would we recommend. What we're going to do here is a walkthrough of both Robomongo and Studio 3T, connected to Compose MongoDB, with some real data imported and queries needed to be performed. We'll see what works, where the differences are and pick out who each one is suited to. Let's dive in and get going.

Setting up the tools

Robomongo 1.0 is free to download for Windows, Mac and Linux platforms. Currently, Robomongo only supports MongoDB 3.2, but they have a roadmap to support 3.4 in the next release. The latest version of Studio 3T, which supports MongoDB 3.4, is also free to download for those three platforms, but you'll only have all the features as a trial period for 14 days. After the trial ends, you still have the non-commercial license of Studio 3T, but all the premium features will be inaccessible. Once you've downloaded the tools, just click the installers and they'll set themselves up on your desktop.

When opening up Robomongo and Studio 3T, you'll be presented with two screens that look very similar with a "Welcome" tab that includes the latest blog from their developers and other news concerning tool improvements. The menus for both tools, however, are very different in what they present. Robomongo's menu could be described as functional: it's for saving and opening files, as well as running and stopping queries. Studio 3T's menu, on the other hand, is focused on tools centered around database administration and querying.

Connecting to your database

Once you've started Robomongo, a connection window will first open up showing you a blank list with links to create, edit, remove, or clone a database connection. In Studio 3T, you can click either the Connect button in the top menu or the green button in the "Welcome" tab to get a similar window with the same database connection options in addition to importing and exporting connections.

When creating a new connection in both, you'll get a screen where you'll enter basic connection information such as the connection alias, the server address and the port number. This is where you'd enter your Compose deployment URL and port number. On top of the screen there are a number of tabs that let you configure the authentication settings and SSL options.

When initially creating a connection using Robomongo, you'll have to break your Compose connection string URI into its constituent parts to fill out the connection fields. However, Studio 3T can take the whole URI and parse it for you, including determining the type of server and SSL settings needed. This makes connecting to Compose very easy.

Migrating your data

When migrating your data into a new database, Robomongo doesn't have any import/export features. Studio3T does and that makes it easy to import JSON, CSV, mongodumped BSON or other collections into a database. Simply click the Import icon in the toolbar and pick a format. Let's import a CSV file, the NOAA fishing vessel permits for 2017, to see how it works.

After selecting the CSV format from the import window, we'll be taken to another window to either import the file from the clipboard or provide a path to a CSV file. Here, we'll enter the name for the database and collection as well. We'll call the database vessel and the collection permits, then we click Next.

After that, we are given a preview of the fields and the data that will be imported into the database. The first set of options let us select other field delimiters, strip CSV headings or turn those headings into field names. The options are accompanied with a quick view of how the file will be processed. Once we're happy, we hit Next.

The next screen gives us precise control of how the data will be mapped into MongoDB; the field type, how empty fields are handled, how escaped characters are inserted, array and document structure detection and trimming of spaces. Again, it's accompanied with a preview of the results.

Once that's set up, Studio 3T will provide you with real-time information on the import process in the Operations window below your database connections.

However, this convenience seems to come with a cost. Studio 3T took around three minutes to import the dataset, compared with less than a second using mongoimport.

Adding users to your database

Now that we've created a database, best practice says that we should create a user for that database for general use. In Studio 3T, click the database then the Users button in the top menu, which will give you a screen where you can add, edit, and drop users as well as grant or revoke their permissions. We're adding "user1" with "dbAdmin" permissions on the vessels database.

With Robomongo, although the feature is there to add users by right clicking the Users folder within the vessels database, there is an outstanding bug that will not allow you to create users, or find existing ones.

Browsing your data

Now that you've created a user and added data to your database, you simply select the collection name and the first 50 documents will appear in a new tab on the right of both tools.

Clicking on a document, both tools can show that document as a tree, table or JSON text. Where Robomongo just displays the document though, Studio 3T presents an editable view with visible BSON types. Clicking on a field lets us change its value. With Robomongo, we have to go to an editor through a menu and modify and validate a JSON version of the document.

Querying your data

The ease by which you can query data is perhaps the most important criteria when evaluating these tools. The query that we'll create will look for vessels with over 1200 horsepower that harvest American lobster.

For querying, both UIs come with a graphical shell to write them using MongoDB query syntax with autocompletion enabled for MongoDB commands and a window displaying the query results below the shell. The graphical shell is how you interact with your data exclusively in Robomongo, while Studio 3T comes with its own graphical shell, called IntelliShell, and a Query Builder. IntelliShell is selected from the top menu. An added feature of this shell is that it autodetects fields in your schema making it easy to select the right key when writing a query.

Querying your database with Studio 3T's Query Builder is done by dragging and dropping the fields into the query builder's Query, Projection or Sort fields and setting the parameters in the forms that appear. Studio 3T generates the appropriate MongoDB query which you can see in the Query tab.

The Result, Query and Explain tabs are a new feature introduced in Studio 3T 5.2.0.

These tabs contain the query results, the generated MongoDB query, and the query plan and its execution statistics, which can be incredibly helpful if you need to debug slow-running or memory-intensive queries.

Another feature in the query screen provides the query history, which includes all the queries you've run in the application, and the ability to bookmark queries. These are found on the upper right-hand corner of the query form.

Robomongo doesn't have the option of looking back into your search history, besides saving a query and loading it back up. However, Studio 3T's search history is pretty useful when you want to go back to your work. For queries you want to save, it lets you bookmark them and save them with an alias. The search history and bookmarks are saved within the application so you don't lose them after disconnecting from a database or when closing the application.

Indexing your data

Now that we've queried the data, let's see how Robomongo and Studio 3T create indexes using the PERMITS field of our dataset. By clicking on the index folder or the collection, both UIs provide screens to create indexes easily.

Robomongo displays a screen of index properties where you set up fields to be indexed in a JSON text area. You can also add other indexing features by navigating through the Basic, Advanced and Text Search tabs. Studio 3T shows a screen that displays all the indexed fields. When you add a field, it provides a list of field names from your dataset that you click to add. Studio 3T provides the same tabs as Robomongo that you can navigate through, but it also comes with options to set up geospatial and partial indexes.

Aggregating your data

Both tools support MongoDB aggregation operations using the aggregate pipeline. Using the graphical shell or IntelliShell, you can write aggregation queries and the output will appear in the output window below. So, writing an aggregation query that will give you the number of vessels that have over 1200 horsepower organized by state and sorted by the average weight of all those vessels in tons looks the same. The difference is that Studio 3T will use autocompletion to suggest pipeline operators at each stage, which is not available in Robomongo, and the shell output will be the same as what you'd see in the MongoDB shell with the results of each execution of the aggregation appearing in a new tab in the output window.

The real benefit of using Studio 3T over Robomongo, however, is the aggregation pipeline builder, which is opened by clicking on Aggregate on the top menu. The aggregation tool allows you control and test the results of aggregations much more thoroughly and easily than manually doing the same tasks in the shell. Clicking on the Aggregate button will open up a screen where you can add, delete, edit, include, exclude, view results of individual stages, and arrange each stage of the pipeline. The results of the aggregation are displayed in the output window below the aggregation builder. Each time the aggregation is executed, a new tab will open with the new results.

Syncing your data

Another feature found in Studio 3T that you won't find in Robomongo will let you compare and synchronize data from different collections. It's only available in Studio 3T Pro and Enterprise licenses at the moment. One use case for this tool is to make sure that the integrity of data and schemas across two databases is sound.

To compare two database collections, you add your source and target connections and then drag and drop your source collection onto the target collection. Then the comparison that Studio 3T will run shows in the comparisons window at the bottom of the screen.

After running the comparison, if there are inconsistencies in your data and/or schemas, Studio 3T will give you the option to either synchronize individual parts of documents or your entire dataset with either database.

Visualizing your server

Studio 3T provides is real-time server monitoring, status, and build information for your Compose MongoDB deployments. You can view your real-time server information by right clicking your deployment then highlighting Show Server Info then select Server Status Charts. This feature basically is running MongoDB diagnostic operations in the background rather than running db.serverStatus and getting metrics manually in the MongoDB shell.

The charts show a variety of statistics: from network traffic to network requests, as well as active clients and operation counts. The update frequency intervals can be configured to give you results ranging from a second to 10 minutes.

Try them out

For the developer who wants a simple tool to query and visualize their data in MongoDB, Robomongo will do a nice job and it's free to download. The only caveat is that you have to know your MongoDB query syntax, and you don't have many of the editing and easy to use querying and visualization tools that Studio 3T provides.

Robomongo is best suited to the developer who wants a more advanced graphical shell that works on MongoDB databases. That developer will already be comfortable with the Mongo shell and query language. For a free tool, it's worth having.

Studio 3T is, on the other hand, more of a MongoDB users tool, with lots of assistance in importing, query building, aggregation and data synchronization. It can be used by the experienced developer too; it doesn't force them into using query builders and the like, but may well be a time saver. The only question with Studio 3T is will it save you enough time to cover its cost.

If you have any feedback about this or any other Compose article, drop the Compose Articles team a line at articles@compose.com. We're happy to hear from you.

attribution Philip Swinburn

Abdullah Alger
Abdullah Alger is a former University lecturer who likes to dig into code, show people how to use and abuse technology, talk about GIS, and fish when the conditions are right. Coffee is in his DNA. Love this article? Head over to Abdullah Alger’s author page to keep reading.

Conquer the Data Layer

Spend your time developing apps, not managing databases.