Reserves Sailors Boats In-Class SQL Exercise

Download Report

Transcript Reserves Sailors Boats In-Class SQL Exercise

In-Class SQL Exercise
Reserves
Sailors
sid
bid
day
22
58
101
103
10/10/96
11/12/96
sid
22
31
58
sname
dustin
lubber
rusty
Boats
rating
7
8
10
age
45.0
55.5
35.0
bid
101
102
103
104
bname
Interlake
Interlake
Clipper
Marine
color
Blue
Red
Green
Red
Use the DDL to define relations for Reserves and Sailors, defining
keys/foreign keys, with a constraint that age is between 16 and 110.
Find boats which have never been reserved
Find sailors sorted by their earliest reservation date.
Change all sailors named “Bob” to have the name “Robert”
List each sailor’s name, along with the number of reservations made by
that sailor.