DEV Community

Deechanya SJ
Deechanya SJ

Posted on

Expert Session: MongoDB

*Step 1: Creating a Dev.to Account
*

Dev.to is a platform where developers share ideas, tutorials, and projects. It’s free, easy to use, and a great way to connect with the developer community.

How to create your account:

  1. Go to Dev.to
  2. Click on the Create Account button at the top right.
  3. You can sign up with your GitHub, Twitter, or email.
  4. Fill in the required details and verify your email.
  5. Once done, personalize your profile and start exploring.

Step 2: Creating a MongoDB Atlas Cluster and Connecting with MongoDB Compass

MongoDB Atlas is a cloud-based service that allows developers to store and manage data online without needing to install MongoDB locally. It’s secure, beginner-friendly, and ideal for modern web development.

Here’s how the setup was done

Creating the Cluster on MongoDB Atlas

The user visited the official MongoDB Atlas website — https://www.mongodb.com/cloud/atlas
.

Click on “Try Free” and create an account using email ID.

After verifying the email, they were taken to the Atlas dashboard.

From there, click “Build a Database.”

Select the Free Shared Cluster option (the “Free forever” plan).

Next, choose a cloud provider (like AWS) and a region close to their location for better performance.

Name the cluster — for example, Cluster0 — and create it.

After a few minutes, the cluster was successfully deployed. 🎉

Setting Up Access

After creating the cluster, open Database Access in the left menu.

Then click “Add New Database User” and created a username and password (saved safely for later).

Then, under Network Access, click “Add IP Address.”

Chose “Allow Access from Anywhere (0.0.0.0/0)” to make it easily accessible during development.

Then , we are creating a database and collection with registration number

Click on "Insert Document" and enter in JSON format


Enter Name and Registration number

Step 3: Connect MongoDB atlas to MongoDB compass

Creating a new Database user


Then go to connections and select Compass
In MongoDB compass paste the connection string in MongoDB Compass URI


Hence the Connection is Established

CRUD operations are the four fundamental functions (Create, Read, Update, Delete) performed on persistent data in a database or application, forming the basic model for managing data throughout its lifecycle. They enable users or applications to add new data (Create), view existing data (Read), modify existing data (Update), and remove unwanted data (Delete).
1.Create Database


2.Inserting values in Database


3.Updating values in Database

@santhoshnc
@nethra_harshini
@d52_pranithanandhakumar_

Top comments (0)