MongoDB has the default CLI (command-line interface) which works fine until you need to execute complicated operations. Most of existing command lines in popular OS really suck with text input. And this is where RoboMongo comes up to help with a pretty GUI.
Robomongo is a user interface for interacting with MongoDB. It is pretty straight-forward and easy to understand. This tool simplifies the way of working with Mongo databases.
Download tool from the below URL
It is a popular MongoDB management tool that makes it easy to create, edit, and retrieve collections and documents in your MongoDB databases.
First need to connet mongoDB via command line, after that create new connection using RoboMongo GUI. After that you will get window as like below
Creating new Database:
Click On Create->Enter DBName->Address as localhost and port as 27017–>Click on Test… Below is the screenshot
Here I created new Database whose name is My First DataBase with port 27017After successful creation of database..Check the created database is available Or not.
Database got created successfully. Now creating collections in to that database.
Creating new collection:
Right click on collection tab and click on create collection as like below.Enter a valid collection name an click on create button.
Eg: Here, given collection name as Employee.
Check whether the created collection is created Or not like below.
Collection got created sucessfully.Now, Inserting the documents into collection
Inserting documents in to collection:
Right click on collection name(Employee)->click on insert document.
Enter documents JSON Data(name/value pairs) as like below.
Need to check the given JSON data is valid Or not for that click on Validate button left corner of the bottom. If the given data is valid the window will be appeared like below.After the Click on Save button. The given document is successfully inserted.
If the given JSON data is not valid.will see the below exception.
Retrieve the Collection:
If the data is available in the collection ,Key, Value will display with it’s corresponding fields. If it is not available in the collection it will display as like below.
Updating existing document. Here in the collection Employee we have a document eid with the value 123. Now I am updating from 123 to 456.. Same as like remaining documents whatever want you to update.
The final collection looks like below:
“_id” : ObjectId(“57dd6b2b6874b1eb0b907ae8”),
“eid” : 456,
“ename” : “abc”,
“eaddress” : “KondaPur”
Drop the Collection:
Select the collection whatever you want to drop and right click->select Drop Collection.
Select the collection whatever you want to rename and right click->select Rename Collection.