Exploring MongoDB Compass

Arthi Murali
4 min readApr 12, 2023

--

Simplified MongoDB Interface — MongoDB Compass

MongoDB Compass is a GUI for MongoDB. MongoDB allows users to analyse stored data without much knowledge of MongoDB query commands.

GUI is easier to learn and use because commands do not need to be memorized. Additionally, users do not need to know any programming language.

Installing and setup of MongoDB compass on ubuntu

  • Go to database deployment page of MongoDB atlas (if haven’t yet setup mongoDB atlas refer this link ) and click on connect.
  • Choose connect using MongoDB compass.
  • Choose the correct operating system and download.
  • Extract the files in downloads
  • Open the terminal and write the following commands to install MongoDB compass . Replace ‘file name.deb’ with the actual name of the downloaded file
cd ~/Downloads
sudo dpkg -i file location.deb
  • The leaf icon in the display is the mongodb compass app.

Connecting to a MongoDB deployment using MongoDB Compass

  • Copy the connection string in the cluster and paste, replace with individual username and password.
  • We can modify or update the data .

Schema

The Schema tab gives a summary of the data type and field shape for each collection. Here are some information about the collection superman, I have created earlier

  • _id field gives an information on creation time of a document for the sampled documents (Analyzing a sample set of data is a common statistical analysis technique, the results of analyzing a sample set tend to be similar to the results of analyzing an entire data set). Object id is the most common document data type, but there are also documents with int32 and string data types.
  • address field provides information on percentage of sampled documents with the specific address. For example there are 30% documents with address chennai in the collection.
  • In age field , the common ages are 9,21,12. In 94% of the documents , age is not defined .

Creating new collection and adding data

  • Click on the + icon to create a new collection.Here i have named the collection Diabetes.
  • Import the csv file into the collection.
  • The above picture shows that the data types are not clear, changes are to be done . For example “Pregnancies” data is not of string data type it should be changed to number.
  • Now the data with proper data type is displayed.

Updating and Filtering the data

  • Here I am updating the name from arthi to murali. On clicking update button , the document will be updated.
  • Filtering documents based on address , with address either chennai or bengaluru.

Thank you for reading. Hope this blog helps!

--

--

Arthi Murali

Data science enthusiast | Data engineering | Biomedical Science Graduate | Chemoinformatics