Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following sample document stored in a MongoDB for restaurants. Write queries for the following questions we want to retrieve the data from

Consider the following sample document stored in a MongoDB for restaurants. Write queries for the following  

Consider the following sample document stored in a MongoDB for restaurants. Write queries for the following questions we want to retrieve the data from the database. { "address": { "borough": "Queens", "cuisine": "American", }, } "building": "8825", "coord": [-73.8803827, 40.7643124], "street": "Astoria Boulevard", "zipcode": "11369" "grades": [ { "date": {"sdate":"2014-11-15T00:00:00.000Z"}, { "grade": "Z", "score": 38 "date": {"$date": "2014-05-02T00:00:00.000Z"}, "grade": "A", "score": 10 "date": {"sdate": "2013-03-02T00:00:00.0002"}, "grade": "A", "score": 7 "date": {"sdate": "2012-02-10T00:00:00.0002"}, "grade" : "A", "score": 13 }], "name": "Brunos On The Boulevard", "restaurant_id": "40356151" 1. Write a query to retrieve names of all restaurants. 2. Write a query to retrieve names of all restaurants given grade A. 3. Write a query to retrieve all cuisines offered in all restaurants. 4. Write a query to retrieve all restaurants who achieved a score of more than 10. 5. Write a query to retrieve all restaurants located in Boulevard area.

Step by Step Solution

3.43 Rating (156 Votes )

There are 3 Steps involved in it

Step: 1

The queries corresponding to the questions youve asked based on the provided document ... 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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant Navathe

7th Edition

0133970779, 978-0133970777

More Books

Students also viewed these Databases questions

Question

3-32. What decision(s) do you recommend?

Answered: 1 week ago

Question

Graph one period of each function. y = 4 cos x

Answered: 1 week ago