Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Recall the simple Beers database ( used in the SQL queries videos ) and some ( approximate ) table definitions from that database: create table
Recall the simple Beers database used in the SQL queries videos and some approximate table definitions from that database:
create table Beers name text primary key, brewer text ;
create table Drinkers name text primary key, address text, phone text ;
create table Likes drinker text references Drinkersname
beer text references Beersname
primary key drinker beer;
Which of the following queries maybe more than one answers the question "Which drinkers like every beer?"
Note that there may be no drinkers that satisfy this property in the original instance of the database.
a
select dname
from Drinkers d
where not exists
select Lbeer as name from Likes L where Ldrinker dname
except
select name from Beers
;
b
select dname
from Drinkers d
where not exists
select name from Beers
except
select Lbeer as name from Likes L where Ldrinker dname
;
c
select dname
from Drinkers d
where select count from Beers
select countLbeer from Likes L where Ldrinker dname;
d
select dname
from Drinkers d
where exists
select Lbeer as name from Likes L where Ldrinker dname
except
select name from Beers
;
e
None of above options is correct
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started