Answered step by step
Verified Expert Solution
Question
1 Approved Answer
[6] (b) Consider the following dataset about cricket players stored in the collection Cricket_Players. {id:001, name:Virat Kohli, teams:[India, RCB, Delhi], runs: 30128, wickets:11, Debut:2008}
[6] (b) Consider the following dataset about cricket players stored in the collection "Cricket_Players". {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 [CO2]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Here are the MangoDB queries for the above tasks i To get all teams include ...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