Creating and connecting to a database in MongoDB Atlas


MongoDB is one of the NOSQL databases in the market which are used for general purposes, and it is an open-source document database and built on C++.

This blog demonstrates the below items

  1. Creating a Cluster in the cloud

  2. Installing Mongodb Compass to connect

  3. Connecting to MongoDB cluster using Compass

  4. Creating a Database

Terminology used in MongoDB:

Database: It is a Physical Container for collections.

Collection: It is a group of MongoDB documents. It is equal to a table in sql databases such as oracle.

To compare oracle sql and nosql MongoDB objects we can compare as below.

Cloud Options

MongoDB Atlas is a global cloud database service built on AWS, Azure, and Google cloud. We can deploy ,operate and scale a MongoDB database in just a few clicks. Here we will discuss on creating MongoDB in Cloud. Login to https://cloud.mongodb.com/ using google account. We can create a database using the below steps after logging to https://cloud.mongodb.com

Click on Build a Database.Choose the free option “Shared” for now

Select any of Cloud service provider, here I chose Azure.

Click on “Create Cluster”

Once the cluster is created ,in network access, add the IP entry to get access from your local desktop.

We also create database user for cluster to access cluster.

We then use MongoDB Compass to connect to the cluster.

Installing MongoDB Compass:

Download software using URL ,for windows File (mongodb-windows-x86_64-5.0.3-signed.msi) {https://www.mongodb.com/try/download/community}

Once Installed open Mongodb Compass

In the connection string paste the URL saved above.

Here we can see all the databases in the cluster

I have created a “Training” Database in below screenshot with single click as create database.

Conclusion

This process describes how we can create a cluster in ATLAS and MongoDB database in the cluster.

Learn about Rackspace NoSQL Data Management.

Use the Feedback tab to make any comments or ask questions. You can also start a conversation with us.

post avatar
D.V. Prakash

Share this information: