Introduction to Mongo DB and installation guide


Hello everyone! What's up? Still with my blog? Ok.. I'm always trying to give you the knowledge I get from my experiences. That's why started the new Express article series! This is another main Topic connected with Express. What is it? It's MongoDB.. What do you know about it? I will explain some important things.

What is MonogDB?

MongoDB is a very popular NO SQL database as we all know. NO SQL means these databases do not use a DML language like SQL. They have a simple set of command of its own. MongoDB is non-relational. Don't think that these db connections do not have relations. They also have relations, but dependency is at a minimum level. SQL has a heavy and long structure of syntax for queries. But these databases do not have strict codes. They are very simple.

Main Features : 
  • Document oriented
  • File storage
  • Indexing
  • Server side JS execution
  • Capped collections


    Now we can move for the installation process. First you need to download the setup (for Windows) from MongoDB official site. 


    After downloading, run the setup and then installation wizard will be opened. click on next and select complete installation.
    Then you will give an interface to with a select option to install compass at the bottom of the wizard. Select it and click next to finish installation.

    Important :
    But there will be error like this in Windows.


    If you got this, installation has been terminated! How to solve this? Simple..
    Run the setup again. At the last step of installation, do not select install compass from the wizard.  (this option is at the right side below, in the wizard). Then move for the next step.. The setup will be installed successfully.

    Setup Environment

    We have to set PATH using environment variables in order to access from anywhere to MongoDB in Windows OS.  Go to the bin folder in the installation folder of MongoDB.
    Path : C:\Program Files\MongoDB\Server\3.6\bin
    Version will be changed..Copy the path..

    Search for Environment variables in OS search. Then go to the wizard.


    Click on Environment Variables. Select the existing path variable or create new one with a name Path.


    Click on Edit button. Then the below wizard will come and select New from it. Paste the copied path in the value field.


    Now Path environment setup is done! 

    Open a cmd and type this to go into C: drive.. command =>  cd ../..

    Then create a folder called data to store MongoDB database files. Inside this data folder, a folder with the name, db will be created after the below command. Then MonogDB will automatically take this folder as the main storage.
    command =>   md \data\db

    Now type  mongod in command prompt. Then it will start to run MongoDB. Now MongoDB is up and running!


    Look at the last line! It says the port that is used by MongoDB.. Now it's open and wait for MongoDB operations. Keep this terminal alive and open another terminal to handle databases using MongoDB. In this new terminal, type  mongo  to handle DB operations.

    Ok Guys! I think you followed me and finished the setting up process for MongoDB. So, get ready to connect with databases and handle them.. My next MongoDB article will talk about those operations!

    Good Bye guys!!!





    Admin Semoga Informasi Yang Diberikan Melalui Web Ini Dapat Bermanfaat Bagi Saudara/i

    No comments for "Introduction to Mongo DB and installation guide"