Professional Documents
Culture Documents
Note:
1. The candidate has option to either attempt question 3 or question 4.
2. Numbers to the right indicate full marks.
3. Use of approved scientific calculator is allowed.
4. Additional 20 minutes will be provided after the examination to submit the answers
Q1) 15 Marks
Q1A. Write a query to create collection names employees, That can accept only 100 5 Marks
employees , make use of field validators.
Q1B Write query to shrad a db.Expain Significance of shrad key. 5 Marks
Q1C What is aggregate pipeline and its stages? 5 Marks
Write a query that returns employee department with count in ascending order
of department names.
Attempt Q3 OR Q4 15 Marks
Q3A. Create a database of movies. Create collection to accept only 100 enteries. 20 Marks
Also the collection should have fields, that compulsary have director name and
emailID, moviename cannot exceed 100 charecters.
Explain the syntax to add new data into collection. Add 10 enetries into the
collection . eg-
{
... "actor id":1,
... fname:"aamir",lname:"khan",
... address:[
... {street:"wall street"},
... {city:"new york"},
Page 1 of 3
... {state:"mid state"},
... {country:"usa"},
... {pincode:"62201"}
... ],
... "contact details":[
... {emailid:"sallu@gmail.com"},
... {phonene:"12345678"}
... ]
... },
... {
... "actor id":2,
... fname:"aamir",lname:"khan",
... address:[
... {street:"wall street"},
... {city:"new york"},
... {state:"mid state"},
... {country:"usa"},
... {pincode:"62201"}
... ],
... "contact details":[
... {emailid:"sallu@gmail.com"},
... {phonene:"12345678"}
... ]
... },
Write a query that shows list of amir khan movies released in current year
Write the aggregate query that groups the data based on actors, gives count of
movies, and sort them in an order.
Q4A. Create database EMP and Make Collection With name "EMPL" 20 Marks
Page 2 of 3
{no:7,name:"VK",salary:300,role:"BW"},
{no:8,name:"JB",salary:400,role:"BW"},
{no:9,name:"HP",salary:400,role:"ALR"},
{no:10,name:"VS",salary:300,role:"OB"}])
Display Data in Proper Format
Add a New Field remark to document with name "RS" set Remark as WC
To Find Document From the empl collection where name begins with S
Page 3 of 3