Exercises Find the names of sailors who’ve reserved boat #103 { N | S Sailors (S.name = N.name R Reserves(S.sid = R.sid R.bid = 103)) }
Exercises Find the names of sailors who’ve reserved any red boat { N | S Sailors (S.name = N.name R Reserves (S.sid = R.sid B Boats(B.color = “Red” B.bid = R.bid))) }
Exercises Find sailors who’ve reserved a red boat or a green boat { S | S Sailors ( R Reserves (S.sid = R.sid B Boats(B.bid = R.bid (B.color = “Red” B.color = “Green” )))) }
Exercises Find sailors who’ve reserved a red boat and a green boat { S | S Sailors (( R Reserves (S.sid = R.sid B Boats(B.color = “Red” B.bid = R.bid))) ( R Reserves (S.sid = R.sid B Boats(B.color = “Green” B.bid = R.bid)))) }
Exercises Find sailors who’ve reserved all red boats {S | S Sailors B Boats(B.color = ‘red’ R(R Reserves S.sid = R.sid B.bid = R.bid))} {S | S Sailors B Boats (B.color ‘red’ R(R Reserves S.sid = R.sid B.bid = R.bid))} Alternatively ….(remember that a b is the same as ¬a b)