NoSQL Assignment E19022
NoSQL Assignment E19022
Q3. Insert below json in collection restaurant and then add at least 4 more in same
collection
Q4. Write a MongoDB query to display all the documents in the collection restaurant
Q5. Write a MongoDB query to display the fields restaurant_id, name, borough and cuisine
for all the documents in the collection restaurant.
Q6. Write a MongoDB query to display the fields restaurant_id, name, borough and cuisine,
but exclude the field “_id” for all the documents in the collection restaurant.
Q7. Write a MongoDB query to display the fields restaurant_id, name, borough, zip code
and grade, but exclude the field _id for all the documents in the collection restaurant.
Q8. Write a MongoDB query to display all the restaurant which is in the borough croydon.
Q9. Write a MongoDB query to display the first 5 restaurant which is in the borough Ealing.
Q10. Write a MongoDB query to display the next 1 restaurants after skipping first 2 which
are in the borough Eagling.
Q11. Write a MongoDB query to find the restaurants who achieved a score more than 9.
Q12. Write a MongoDB query to find the restaurants that achieved a score, more than 4 but
less than 10.
Q13. Write a MongoDB query to find the restaurants which do not prepare any cuisine of
'American ' and achieved a grade point 'A' not belongs to the borough croydon. The
document must be displayed according to the cuisine in descending order.
Q14. Update document zipcode of all documents to 560070
Q17. Remove sub document grades from document where zipcode is 987456.