Based on the following schema,
sailors (sailor-id, sailpr-name, age):
boats (boat-id, boat-name, colour):
reserves (sailor id, boat id, day);
What does the following SQL query imply?
SELECT S.sailor_name FROM sailors S WHERE S.sailor_id IN
(SELECT R.sailor_id FROM reserves R WHERE R.boat_id >= 103);
(A)
Understand the schema:
sailors(sailor_id, sailor_name, age)reserves(sailor_id, boat_id, day)(D)
Break down the SQL query:
SELECT R.sailor_id FROM reserves R WHERE R.boat_id >= 103
→ Gets all sailor_ids who have reserved boats with ID 103 or higher.
SELECT S.sailor_name FROM sailors S WHERE S.sailor_id IN (...)
→ Gets names of those sailors from the sailors table who match the IDs found above.
(G)
Interpretation:
Digital signatures provide ________.
A Session variable is created ________.
Based on the following schema,
sailors (sailor-id, sailpr-name, age):
boats (boat-id, boat-name, colour):
reserves (sailor id, boat id, day);
What does the following SQL query imply?
SELECT S.sailor_name FROM sailors S, boats B, reserves R
WHERE S.sailor_id = R.sailor_id AND R.boat_id = B.boat_id
AND (B.colour = 'red' OR B.colour = 'green');