So, Hello guys, This blog will be very helpful if you are fresher in software development field. As, I will explain how to setup sandbox MongoDb database for free.
MongoDB is a source-available cross-platform document-oriented database program. MongoDB is sorted a NoSQL database, It uses documents like JSON format with optional schemas. MongoDB is developed by MongoDB Inc. and licensed under the Server Side Public License.
Steps to Setup MongoDb for develop any project.
Note:It can be only use for learning purpose, because Mongodb.com only give 500MBs, as database storage, so if you are using for Medium or Large size project than go with premium package offered by MongoDb.
1. Create Account in Mongodb
Click here to open MongoDd login page. Login with google, or create free account from signup page. keep in mind that it is totally free.
After logged-In you will see this kind of dashboard.
2. Build Clusters
Click on the “Build a Cluster” Button. It will redirect you to “Choose a Path” page, from there select Shared Clusters and click on “Create a Cluster”, a shown in the bellow images.
Once you click on the “Create a Cluster“, it will redirect you to “Create a Starter Cluster“, in that setup follow these steps
Cloud Provider & Region
- Cloud Provider & Region -> Select “aws”
- Recommended region -> Select anyone you want or keep as they recommended. In my case I have selected “Mumbai“
- Cluster Tire -> Select M0 Sandbox, which has 512 MB Storage, and which is free forever.
- Additional Settings -> Keep as it is, because it will only work for M2 or M5 Tire.
- Cluster Name -> Change cluster name to as you want.
Then click on “Create Cluster“. As shown bellow image
When you click on “Create Cluster”, you will see following.
Now we have successfully created cluster, In witch we can create unlimited databases, but up to 512MB.
3. Create Database and Collection
As it is document-oriented database, in MySql we have tables, but in Mongodb it is called collection.
To create first collection click on collections button, you will it in recently created cluster box.
Now, you will see List of collections,
If you don’t have any it will ask you to Load a Sample Dataset or Add My Own Data. If you have your mongodb collection exported from any other places or from Mongodb from local, then you can click on Load a Sample Dataset and load your existing data. And if you want to just create a new Collection then click on Add My Own Data. In our case I will show you to create new collection.
Once you click on Add My Own Data. you will see..
Insert database name and collection name, Let say database name is “demo” and collection name is “users”. Then click on create.
As you can see in above image, database and collection are created with name “demo“ and “user”.
So, this is how you can create database online with trusted site Mongodb.com. From here you can also create new database and add collections, also you can add entries in your existing collections.
If you want to learn How to connect Mongodb with Nodejs using Mongoose?
Thank you for reading and stay tune, stay connected and stay safe. Please support us by sharing the blog.
Read our other blogs on ITbulls.in