BestChange - exchange monitor, earn as an affiliate!

Tuesday, March 24, 2015

MongoDB for .Net Developers: Homework 1.1

Week 1: HOMEWORK 1.1

Install MongoDB on your computer and run it on the standard port.
Download the HW1-1 from the Download Handout link and uncompress it.
Use mongorestore to restore the dump into your running mongod. Do this by opening a terminal window (mac) or cmd window (windows) and navigating to the directory so that you are in the parent directory of the dump directory (if you used the default extraction method, it should be hw1/). Now type:
mongorestore dump
Note you will need to have your path setup correctly to find mongorestore.
Next, go into the Mongo shell, perform a findOne on the collection called hw1 in the databasem101. That will return one document. Please provide the value corresponding to the "answer" key from the document returned.
Answer: 42

No comments:

Post a Comment