51.6k views
5 votes
You have a map of all restaurants in Champaign-Urbana and you are trying to find a Mexican restaurant which can accommodate a group of more than 20 people. What query would you write?

a) (Restaurant='Mexican') OR (Capacity>20)
b) (Capacity>20) OR (Restaurant='Mexican')
c) {NOT(Capacity<20) AND (Restaurant='Mexican')}
d) {NOT(Restaurant='Mexican')AND (Capacity<20)}

User Pranee
by
7.9k points

1 Answer

3 votes

Final answer:

The correct query to find a Mexican restaurant that can accommodate more than 20 people is by using an AND operator with both conditions, as shown in option c: (NOT(Capacity<20) AND (Restaurant='Mexican')).

Step-by-step explanation:

If you are looking to write a query to find a Mexican restaurant in Champaign-Urbana that can accommodate a group of more than 20 people, you should use the query that includes both conditions: the restaurant must be Mexican, and it must have the capacity for more than 20 people. The correct query is an AND operation of both conditions, not an OR. Therefore, the correct query is: (NOT(Capacity<20) AND (Restaurant='Mexican')), which is option c. This query will return only the Mexican restaurants that have a capacity of more than 20 people.

User Toza
by
8.1k points