Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

suppose that you have a collection of documents in mongodb, each document represent a movie information as the following sample show { title: Into Darkness,

suppose that you have a collection of documents in mongodb, each document represent a movie information as the following sample show
{
title: "Into Darkness",
year: 2013,
genre: [
"Action",
"Adventure",
" Sci - Fi ",],
actors: [
"Pine, Chris",
"Quinto, Zachary ",
"Saldana, Zoe ",],
releases: [{
country: " USA
date: "2013-05-17",
prerelease: true},
{country: Germany ",
date:" 2003-05-16",
prerelease: false
}]}
For each case of the following, query MongoDB to return results from the collection:
Return all document whose title is Into Darkness & produced after 2010
For the same query in (1), make MongoDB only return the following fields; title, year, actors
Delete only one document from the collection whose title is Into Darkness
Return all documents that are released in USA country
Write a query to add rating:5 to the document whose title is Into Darkness
Sort movies in ascending order based on the year and number of actors
Use mapreduce to run mongodb that finds the average ratings of movies produces in 1999; write map function, reduce function, and how to use them in query

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions