Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(b) Consider the following dataset about cricket players stored in the collection Cricket_Players. [6] [CO2] {_id:001, name:Virat Kohli, teams:[India, RCB, Delhi], runs: 30128, wickets:11, Debut:2008}
(b) Consider the following dataset about cricket players stored in the collection "Cricket_Players". [6] [CO2] {_id:001, name:"Virat Kohli", teams:["India", "RCB", "Delhi"], runs: 30128, wickets:11, Debut:2008} {_id:002, name:"Rohit Sharma", teams:["India", "MI", "Mumbai", "DC"], runs:19899, wickets:35, Debut:2007} {_id:003, name:"MS Dhoni", teams:["India", "CSK", "Jharkhand"], runs: 17266, wickets:1, Debut:2004} {_id:004, name:"Sachin Tendulkar", teams:["India", "MI", "Mumbai", "Yorkshire"], runs:81742, wickets:472, Debut: 1989} Write MongoDB queries for the following (i) To get all the documents where "teams" include "MI" (ii) To get all the players who debut after 2005 (iii) To append the value "East Bengal" to the document where _id is 004
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started