Get fast, custom help from our academic experts, any time of day.
Place your order now for a similar assignment and have exceptional work written by our team of experts.
Secure Original On Schedule
Use gutenbergCollection-v2.json *** for the first six problems ***
q1. Add the title below to the collection. (note: string values should be double-quoted)
id : 30000
url: https://www.gutenberg.org/files/30000/30000-0.txt
title: The Bird Book
author: Chester A. Reed
released: September 15, 2009
price : 7.99
q2. Find the total number of titles in the collection.
q3. Add a date of birth (dob: 10/10/0004 BC) attribute to the document(s) for Lucius Seneca so that the document has the following information. Note your collection name could be different.
db.bookCollection.find({author: “Lucius Seneca”}, {_id:0}).pretty()
{
“id” : “10001”,
“url” : “http://www.gutenberg.org/files/10001/10001.txt”,
“title” : “Apocolocyntosis”,
“author” : “Lucius Seneca”,
“released” : “November 10, 2003”,
“price” : 5.39,
“dob” : “10/10/0004 BC”
}
q4. Find the number of books with prices higher than $9.
q5. Find the authors who have Fred in their names and wrote books with prices less than $4. Your answer should only show authors and book titles, and output entries are ordered by author in alphabetic order.
q6. Find the number of books that each author, with his/her name containing smith, has in the collection.
*** Use movies and comments collections from the sample-mflix database for the last two problems. ***
q7. For each director, find the number of movies they direct and return the top 10 directors with the most movies.
q8. Combine the following movie with its comments. For output, only output the movie title, who wrote the comment, and comment text.
{
“_id”: {
“$oid”: “573a1396f29313caabce4c60”
},
“num_mflix_comments”: 4,
“title”: “Play It Again, Sam”
}
q9. Describe a use case where a MongoDB database is preferred to a relational one. Justify your answer with at least 50 words.
Get fast, custom help from our academic experts, any time of day.
Secure Original On Schedule