Question: We will use the database schema from the SQL assignment (with the same constraints): Consider the following queries (the second is Q6 from the SQL

 We will use the database schema from the SQL assignment (with

We will use the database schema from the SQL assignment (with the same constraints): Consider the following queries (the second is Q6 from the SQL assignment): 1. List the drinkers who like every beer served at 'The Swan'. The answer should have one attribute drinker. Note that, if 'The Swan' does not serve any beer, then all drinkers should be in the answer. 2. Find the bars that serve every beer Joe likes at the lowest price. The answer should have a single attribute bar. For queries (1) and (2) do the following: (i) write the query in relational calculus using (at least one) universal quantification (ii) rewrite the query in (i) in using only existential quantification (iii) write the SQL query corresponding directly to the relational calculus query in (ii), that uses only NOT EXISTS tests on nested queries

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!