Install MongoDB in windows
Install MongoDB in windows, In this Article i will guide you through on how to install Mongo DB in Windows?
What is Mongo DB ?
Mongo is a no sequel database , it works with Documents in Json format , and has an Auto Generation ID for inserted Data.
Difference between Mongo DB and Sequel Data Base ?
No | MongoDB | Sequel DataBase |
---|---|---|
1 | Flexibility | Rigid predefined structure of column and row. |
2 | Cannot Create relationship | Can Create relationship |
3 | Scalable | Hard to Scale |
4 | Created on Demand | Table Structure |
5 | Auto Generated ID | Pre Define ID |
Installing Mongo DB
- Download Mongo DB here
- Start the Installation .
Making New Directory to Hold Mongo DB database
- Open Command Prompt
- Type “md\data\db –> Meaning Make a directory call data , and inside the data Directory there is another directory call db
Connecting Mongo DB
- Navigate to your Mongo DB Directory
- When you found the Mongo DB Bin Directory, at the Search Panel type “cmd”
- The System will open Command Prompt
- Type ” mongod.exe”
- Then Open another ” Command Prompt” window
- At the New Command Prompt Window type “mongo.exe –port 27017
- Finally the Mongo internal Host Server will be Connected
Check what Data Base you have inside Mongo DB
- At your Command Prompt type ” show dbs “
Check what Data Base you have inside Mongo DB
- Insert An Entry call ” Products ” into the Mongo DB Database
- Type the Json Format” db.products.insert({“productName”: Donut”, “price” : 5.00})
Check out Mongo DB database Entry
- At your Command Prompt type “show collections”
- Type db.products.find().pretty()
Check out Loading Data From csv json Excel Text Using Python . Here
Leave a Reply