MongoDB Query Builder

The MongoDB query builder gives users the ability to build queries for selecting and searching data in MongoDB collections. It also gives users the ability to build SQL insert statements to insert data that can be executed using RazorSQL.

The MongoDB query builder contains 3 tabs - select, search, and insert.

Using the select tab, users can choose operators and column values to use to query a MongoDB collection. For example, if there is a collection called employee that contains attributes for last name and salary, the query builder allows users to enter values for last name and salary, and whether to use an "AND" or "OR" operator when searching the data. Here is an example query:

database.employee.find({"lname":"Smith","salary":{"$lt":40000}})

The search tab of the query builder allows users to enter criteria for searching MongoDB collections. For example, the user can select they would like to search for rows where the first name contains "Jo" and the last name equals "Smith". The query builder would then generate the following:

test.employee.find({"fname":{"$regex":".*Jo.*", "$options":'i'}, "lname":"Smith"})

The insert tab of the MongoDB query builder allows users to quickly insert data. Users can select which columns to include in the insert statement, and the corresponding data for those columns. The query builder generate insert statements in SQL syntax that can be executed against MongoDB using RazorSQL.

RazorSQL also offers many other MongoDB tools such as a MongoDB database browser, GUI tools for managing MongoDB collections, and much more. See the main MongoDB Features Page for more information.

MongoDB SQL Query Builder