We always provide our best creative ideas at the highest level. Tell us about your project and we will make it work.
Write a program in the language of your choice that will remove the lowest homework score for each student. Since there is a single document for each student containing an array of scores, you will need to update the scores array and remove the homework. Remember, just remove a homework score. Don't remove a quiz [...]
You should see four files in the 'blog' directory: app.js, users.js, posts.js, and sessions.js. There is also a 'views' directory which contains the templates for the project and a 'routes' directory which contains our express routes. If everything is working properly, you should be able to start the blog by typing: npm install node app.js [...]
Homework: Homework 6.5 In this homework, you will build a small replica set on your own computer. We will check that it works with validate.js, which you should download from the Download Handout link. Create three directories for the three mongod processes. On UNIX or mac, this could be done as follows: mkdir -p /data/rs1 [...]
Homework: Homework 6.3 Which of the following statements are true about choosing and using a shard key? MongoDB can not enforce unique indexes on a sharded collection other than the shard key itself, or indexes prefixed by the shard key. There must be an index on the collection that starts with the shard key. You [...]
Homework: Homework 6.2 Let's suppose you have a five-member replica set and want to assure that writes are committed to the journal and are acknowledged by at least 3 nodes before you proceed forward. What would be the appropriate settings for w and j? Solution: w="majority"
Homework: Homework 6.1 Which of the following statements are true about replication in MongoDB? Check all that apply.
The solution to Homework 5.4 M101JS: MongoDB for Node.js Developers Homework: Homework 5.4 Removing Rural Residents In this problem, you will calculate the number of people who live in a zip code in the US where the city starts with a digit. We will take that to mean they don't really live in a city. Once [...]
The solution to Homework 5.2 (Hands-On) M101JS: MongoDB for Node.js Developers Crunching the Zipcode datasetPlease calculate the average population of cities in California (abbreviation CA) and New York (NY) (taken together) with populations over 25,000. For this problem, assume that a city name that appears in more than one state represents two separate cities. Please [...]
Homework: Homework 5.1 (Hands-On) Finding the most frequent author of comments on your blog In this assignment, you will use the aggregation framework to find the most frequent author of comments on your blog. We will be using the same basic dataset as last week, with posts and comments shortened considerably, and with many fewer [...]
HOMEWORK: HOMEWORK 4.3 Solution to HOMEWORK 4.3 M101JS: MongoDB for Node.js Developers NOTE there is a bug (TOOLS-939) affecting some versions of mongoimport and mongorestore that causes mongoimport -d blog -c posts < posts.json to fail. As a workaround, you can usemongoimport -d blog -c posts < posts.json –batchSize 1.If you have any difficulty using MongoProc, [...]
The solution to HOMEWORK 4.1 M101JS: MongoDB FOR NODE.JS DEVELOPERS Suppose you have a collection with the following indexes: > db.products.getIndexes() [ { "v" : 1, "key" : { "_id" : 1 }, "ns" : "store.products", "name" : "_id_" }, { "v" : 1, "key" : { "sku" : 1 }, "unique" : true, "ns" : [...]
The solution homework 3.3 M101JS: MongoDB for Node.js Developers Making your blog accept comments In this homework, you will add code to your blog so that it accepts comments. Download and unpack the files for this homework from the Download Handout link. You will be using the same code as you downloaded for homework 3.2, [...]
Making your blog accept posts In this homework, you will be enhancing the blog project to insert entries into the posts collection. After this, the blog will have basic functionality. It will allow you to add blog posts with a title, body, and tags and have it be added to the posts collection properly. We [...]
HOMEWORK: HOMEWORK 4.4 In this problem, you will analyze a profile log taken from a MongoDB instance. To start, please download sysprofile.json from Download Handout link and import it with the following command: mongoimport -d m101 -c profile < sysprofile.json Now query the profile data, looking for all queries to the students' collection in the [...]
HOMEWORK: HOMEWORK 4.2 Suppose you have a collection called tweets whose documents contain information about thecreated_at time of the tweet and the user's followers_count at the time they issued the tweet. What can you infer from the following explain output? > db.tweets.explain("executionStats").find({"user.followers_count":{$gt:1000}}).limit(10).skip(5000).sort( { created_at : 1 } ) { "queryPlanner" : { "plannerVersion" : 1, [...]