LAB1: DBI202
An Algebraic Query Language
1. Find the names of sailors who have reserved boat 103
๐sname (Reserve โbid=103 Sailor)
๐sname ((๐bid=103 Reserve) ร Sailor)
๐sname (๐bid=103 (Reserve โ Sailor))
๐sname ((๐bid=103 Reserve) โ Sailor)
๐sname (๐(R, (๐bid=103 Reserve)) โr.sid=sailor.sid Sailor)
2. Find the names of sailors who have reserved a red boat
๐sname ((๐color= โredโ Boats) โ Reserve โ Sailor
๐sname (๐sid ((๐bid ๐color= โredโ Boats) โ Reserve) โ Sailor)
3. Find the colors of boats reserved by Lubber
๐color ((๐sname= โLubberโ Sailor) โ Reserve โ Boats)
4. Find the names of sailors who have reserved at least one boat
๐sname (Sailor โ Reserve)
5. Find the names of sailors who have reserved a red or a green boat
๐sname (๐color= โredโ or color= โgreenโ Boats โ Reserve โ Sailor)
6. Find the names of sailors who have reserved a red and a green
boat
๐sname (๐color= โredโ Boats โ Reserve โ Sailor)
โฉ
๐sname (๐color= โgreenโ Boats โ Reserve โ Sailor)