1. Install MongoDB On Windows
To install MongoDB on Windows, first download the latest release of MongoDB from https://www.mongodb.org/downloads. Make sure you get correct version of MongoDB depending upon your Windows version.
2. Running mongoDB
Go to location where mongo DB is installed “C:\Program Files\MongoDB\Server\3.4\bin” and open command prompt at that location and execute following command in command prompt.
3. MongoDB Help
To get a list of commands, type db.help() in MongoDB client. This will give you a list of commands as shown in the following screenshot.
4. Show All Databases
Use below command to get list of all databases.
5. Create new database
To create a new database execute the following command.
6. Know your current selected database
To know your current working/selected database execute the following command
7. Drop database
To drop the database execute following command, this will drop the selected database
8. Create collection
To create the new collection execute the following commands
9. To check collections list
To get the list of collections created execute the following command
10. Drop collection
To drop the selected collection execute the following command
11. Insert document in collection
To insert single document in selected collection execute the following command
To insert multiple documents in selected collection execute following command
12. Get collection document
To get the list documents in collection execute the following command
13. Update document
To update the document in collection execute the following command
14. Save document
To save document in collection execute the following command
15. Delete document
To delete document in selected collection execute the following command
If you would like for more details on the content of this blog, please comment on the section given below and I would try my best to answer your all queries.