Creating Database using MongoDB Compass (original) (raw)

Last Updated : 5 May, 2026

MongoDB is a document-oriented NoSQL database, and MongoDB Compass is a GUI tool that simplifies database interaction without complex query syntax.

MongoDB Compass

MongoDB Compass is a free GUI tool that provides an intuitive way to manage and interact with MongoDB databases.

MongoDB Document-Oriented Data Model

MongoDB uses a document-oriented data model that differs from relational databases like MySQL by storing data in flexible, JSON-like documents.

Example of a Document

The Document contains the information of a STUDENT in JSON format.

{
"Name" : "Ron",
"Age" : 21,
"Gender" : "Male",
"Dept" : "CS"
}

Example of a Collection

The Bunch of documents creates a collection.

[
{
"Name" : "Ron",
"Age" : 21,
"Gender" : "Male",
"Dept" : "CS"
},
{
"Name" : "Kim",
"Age" : 19,
"Gender" : "Male",
"Dept" : "BBA"
},
{
"Name" : "Ron",
"Age" : 21,
"Gender" : "Male",
"Dept" : "HIS"
},
{
"Name" : "Alen",
"Age" : 21,
"Gender" : "Male",
"Dept" : "CS"
}
]

Installation of MongoDB Compass

MongoDB Compass is a GUI tool for MongoDB that allows users to analyze and manage data without knowing MongoDB query syntax. To create a database using MongoDB Compass, the application must first be installed on the system.

Steps to Install MongoDB Compass

**Step 1: Download the MongoDB Compass exe package from MongoDB official Website.

**Step 2: After Redirect to that page Click on "Download" Button.

9.png

**Step 3: After Successful Download, Open the downloaded file by double click on Downloaded File.

**Step 4: After Double Click on the Downloaded File. MongoDB Compass Starts Installing in your system. It takes a few seconds to install.

mongo

**Step 5: After Successful Install it will be automatically opened in your system.

11.png

From the Above Steps, we have learned how to Install MongoDB Compass. Now Lets, Learn How to Create a Database using MongoDB Compass.

Steps to Create a Database Using MongoDB Database

Now that MongoDB Compass is installed, follow these steps to create your first database and collection:

**Step 1: Simply Open MongoDB Compass on your system.

**Step 2: After Successfully Opening, click the Connect button to connect to your MongoDB server.

**Step 3: If you're using MongoDB Atlas, copy the connection string from the Atlas dashboard and paste it into the Compass connection field. If you're working with a local MongoDB instance, use the default connection URI: mongodb://localhost:27017.

1.png

**Step 4: After connecting to MongoDB, click the plus (+) sign next to Databases on the left sidebar.

2.png

**Step 5: Click on Plus (+) icon, a popup will appear in which you have to give Database Name and Collection Name.

3.png

**Step 6: Here we can give any Database Name and Collection Name as per your Choice. Here taking the Database name "GFG" and Collection Name "college".

**Step 7: Click on the "Create Database" Button.

4.png

From the above Steps Database of the name "GFG" will be Created.

**Step 8: After that, click on "ADD DATA" and select the "Insert document" option.

5.png

**Step 9: Click on "Insert document" a new popup appear.

6.png

**Step 10: Paste or write the bunch of documents that is Collection and then Click on the "Insert" Button.

Database has created using MongoDB compass.