4.2 MongoDB Verification
Last updated
Last updated
MongoDB is the database used in our project. It is a modern and flexible database system that stores data in a format similar to JSON documents.
NOTE: You can use your own hosted MongoDB as well. You just need to setup the MongoDB in the environment of your liking, confirm the MongoDB connection, and then add the connection URL in the form field.
Example Connection URL:
mongodb+srv://<username>:<password>@YOUR_HOST_NAME
Here are the some preferred places where you can purchase and setup the MongoDB.
You can use any other services to setup MongoDB as well.
The reason for using MongoDB in our project is its flexibility and scalability. It enables us to store and retrieve data in a manner that aligns with our project's needs. MongoDB's document-oriented structure simplifies working with varying data formats and eliminates the necessity for a fixed schema.
Create a MongoDB account or Log in to MongoDB. Below are the given links for Sign up and Log In.
Signup: https://www.mongodb.com/cloud/atlas/register
Login: https://account.mongodb.com/account/login
After logging in for the first time, kindly complete the Initial setup by adding details like ‘Not Sure’ as shown in the image below.
Now, create a new cluster by clicking on Build a Cluster.
Select any cluster as per your preference, and Change the cluster name to your liking.
Add your IP address or select "Allow Access from Anywhere and continue to the next step".
After adding an IP address or selecting "Allow Access from Anywhere and continue to the next step," click on Add IP Address. Then, add the username and password to create the database user for accessing the database through the connection string. NOTE: Keep the user credentials with you or save them somewhere, as they will be needed in the connection string.
After successfully adding the IP and DB user, choose Compass as the connection tool to obtain the connection URL.
Now, copy the connection string and replace <db_password> with the password of your DB user. Now you can use this connection string to connect through compass, also add it in the form field for MongoDB connection string.