MongoDB on Windows a Look in 5 Minute


First, you need to download 64 bit binaries for Windows 64 bit from here. After downloading, unzip the downloaded ZIP file to any location of your choice. After extracting, rename the folder to mongodB.

Next, navigate to the folder in which you unzipped the downloaded binaries. You will get the following executable file downloaded.

mongo1.gif

The most important exes are, Mongod.exe to connect to mongo database server and Mongo.exe to start administrative shell.

By default MongoDB creates a database and stores data in the Data folder inside the C Drive. You need to create this folder manually. You need to create them as below:

mongo2.gif

You can connect to the MongoDB server as below by executing mongod exe.

mongo3.gif

Once the server is started, you can start the administrative shell as below by executing the mongo command.

mongo4.gif

From the administrative shell if you want to add two numbers, you can do that as below:

mongo5.gif

By default, It connects to database test.

mongo6.gif

If you want to insert data you can do that as below; the following command will create a database called debugmode [only after the first row has been inserted] and then add name as dj.

mongo7.gif

You can explore the Help option to know more about the executable and commands. In a further article we will go deeper into that and explore working with MongoDB and CSharp.

I hope this article is useful.

Thanks for reading...

Up Next
    Ebook Download
    View all
    Learn
    View all