MongoDB is Document oriented open source database. In MongoDB,
Relation Database are stored in JSON like document format.
Required tools in System:
- MongoDB Setup
- Command Prompt
Step-1 : Install MongoDB
Download MongoDB setup and install in system.(Download MongoDB).
Step-2 : Set Environment variable
Open MongoDB BIN directory shown in below image and copy BIN directory path.
Press OK button to save and close window.
Step-3 : Create db directory
Now we have to create db directory. C:\data\db
So first create data directory in c drive.
In data directory we will create db directory.
Step-4 : Open Command Prompt for MongoDB server
Open Command prompt for run MongoDB server.
Step-5 : Run MongoDB Server
Now run MongoDB server using mongod command.
We see that server is running and waiting for MongoDB client for connection.
Step-6 : Open Command Prompt for MongoDB client
Open another Command prompt for run MongoDB client.
Step-7 : Run MongoDB Client
Now we run mongo command for establish connection between MongoDB client and MongoDB server.
MongoDB Server shows successful connection message and give information that one client is connected.
Step-8 : Execute Mongo Query
After successful connection we can perform Mongo Query in MongoDB client window as shown in below.
No comments:
Post a Comment