Question: Question 4 . [ 6 MARKS ] Consider the following schema. Primary keys are underlined. The following syntactically correct queries in SQL and relational algebra
Question
MARKS
Consider the following schema. Primary keys are underlined.
The following syntactically correct queries in SQL and relational algebra attempt to return the set ie
with no duplicates of all SIDs of all Sailors who have never reserved a red boat. For each, circle one
answer to indicate whether it is correct or incorrect. Note that the symbol means "not equal to or
select SSID
from Sailor
where SSID not in select RSID
from Reserve R Boat B
where BColor 'red'
Circle one: correct incorrect
select distinct SSID
from Sailor S Reserve R Boat B
where SSID RSID and RBID BBID and BColor 'red'
Circle one: correct incorrect
select SSID
from Sailor
where not exists select RSID
from Reserve R Boat B
where SSID RSID and RBID BBID and BColor 'red'
Circle one: correct incorrect
select distinct RSID
from Reserve R Boat B
where BIDBID and Bcolor 'red'
group by RSID
having count
Circle one: correct incorrect
Sailor
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
