MongoDB (part 3): Install mongoDB and CRUD practice in MongoDB
4 min readJun 16, 2022
- Download MongoDB from here.
2. Download mongoDB tools from here.
The tricky part is that you should include Tools inside bin folder of mongodb/server.
3. Edit path
Click Start -> “Edit the system environment variables”
Then click “Path” -> “Edit”
Click “New” -> Add new path to current path
Of course, restart your machine!
4. Open CMD: type in “Mongo”
Play around with some command as “show dbs”, “use <db name>”, “show collections” and so on.
5. Download dataset from here.
6. Import data into database
- First transform bson into json readable format.
By opening cmd, direct to the folder that contains data sets. Use bsondump command as in figure below.
- Then open MongoDBCompass and create several collections and import transformed json files. (or use cmd if you want)
Query practice
Please refer to this documentation for futher information.
1.Number of people named “Pauline Fournier”
2.Number of people named “Pauline Fournier” and were born before 01/01/1970
3.Number of people named:
- Lucas Dubois
- Camille Dubois