Creating and connecting to a database in MongoDB Atlas

by Rackspace Technology Staff

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.

 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
 

mongodb pic 1

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 

Mongo db pic 2

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

mongo db pic 3

 

mongo db pic 4

Select any Cloud service provider, here I chose Azure.

mongodb pic 5

 

mongodb pic 6

 Click on "Create Cluster"

mongodb piv image 6-1
mongodb pic 7

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

mongodb pic 8

We also create database user for cluster to access cluster.

mongodb pic 9

 We then use MongoDB Compass to connect to the cluster.

Mongodb pic 10

Installing MongoDB Compass: 

Download software using URL ,for windows File 

mongodb Pic 11

 

Mongodb Pic 12

 

mongodb pic 13
mongodb pic 14

 

mongodb pic 15

 

mongodb pic 16

 

mongodb pic 17

Once Installed open Mongodb Compass

mongodb pic 18

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

mongodb Pic 20
mongo db pic 21

 Conclusion

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

Related Resources

Learn about Rackspace Data Management.