HOMEWORK HOMEWORK 1.2 MONGODB
When it says “user creation successful” and “user login successful”, you can Turn in your assignment. To confirm you are on the right track, here are some queries to run after you process the data with the correct answer shown:. Change directory into hw1 Use mongorestore to restore the dump into your running mongod. Then install all the dependencies listed in the ‘package. Write that text in the text box below. By fast, we mean that indexes should be in place to satisfy these queries such that we only need to scan the number of documents we are going to return. We are also providing a patriotic if you are an American data set for the blog.
What is the latency of the longest running operation to the collection, in milliseconds? Express server listening on port If you goto http: The blog has been enhanced so that it can also display the top 10 most recent posts by tag. If everything is working properly, you should be able to start the blog by typing: We are also providing a patriotic if you are an American data set for the blog. You must load this dataset to complete the problem.
Your assignment is to figure out the “State” that recorded the lowest “Temperature” when the wind was coming from the west “Wind Direction” between and If you have the mongodb driver installed correctly, this will print out the message ‘Answer: To confirm you are on the right track, here are some queries to run after you process the data 1.22 the correct answer shown:.
By fast, we mean that indexes should be in place to satisfy these queries such that we only homeworl to scan the number of documents we are going to return. Remember, just remove a homework score. One way is to find the lowest homework in code and then update the scores array with the low homework pruned. You should see four files in the ‘blog’ directory: Assuming this document has the highest “Temperature” for the “State” of “Vermont” in our collection, the document should look like this after you run your program:.
To confirm you are on the right track, here are some queries to run after you process the data with the correct answer shown: Now run the application to get the homweork to hw The database calls that you are going to add will add a new user upon sign-up and validate a login by retrieving the right user document.
Once you have added the indexes to make those pages fast, just validate your work with MongoProc. Now query the profile data, looking for all queries to the students collection in the database school2, sorted in order of decreasing latency.
To figure out what queries you need to optimize, you can read the code in posts. Write a program in the language of your choice that will remove the lowest homework score for each student. We have removed parts of the mongoxb that uses the Node.
If you select all the weather documents, you can sort first by state, then by temperature. To get started, please download hw The blog stores its data in hoomework blog database in two collections, users and sessions. You can verify that you’ve imported the data correctly by running the following commands in the mongo shell:.
MongodbChamps: M MongoDB for DBAs – Week 1 – Homework
You might want to start by inspecting it in the Mongo shell. If you have all the dependencies installed correctly, this will print the message ‘Express server started on port ‘. Express server listening on port If you goto http: After you run the mobgodb, you should see the message:.
Note that this is only an example and not the actual document that you would be updating. You should not need to touch any other code.
The blog has been enhanced so that it can also display the top 10 most recent posts by tag. After you run the blog, you should see the message: That will return one document. Your assignment for this part of the homework is to install the mongodb driver for Node. But you can, for fun. With the new schema, this problem is a lot harder and that is sort of the point.
Hello from MongoDB!
There are entries with lots of comments and tags. We have provided the full code for the blog application and you don’t need to make any changes, or even run the blog.
There are hyperlinks from the post tags to the page that displays the 10 most recent blog entries for that tag. This is homewrk comma separated value file that you can import into MongoDB as follows: