The document contains 10 queries using relational algebra operations to retrieve information from tables in a database about sailors and boat reservations. The queries find the names of sailors who reserved a specific boat or boats of certain colors, the colors of boats reserved by a particular sailor, and identifies sailors based on criteria like reserving all or a minimum number of boats.
The document contains 10 queries using relational algebra operations to retrieve information from tables in a database about sailors and boat reservations. The queries find the names of sailors who reserved a specific boat or boats of certain colors, the colors of boats reserved by a particular sailor, and identifies sailors based on criteria like reserving all or a minimum number of boats.
The document contains 10 queries using relational algebra operations to retrieve information from tables in a database about sailors and boat reservations. The queries find the names of sailors who reserved a specific boat or boats of certain colors, the colors of boats reserved by a particular sailor, and identifies sailors based on criteria like reserving all or a minimum number of boats.
who have reserved boat 103 1. Find the names of sailors who have reserved boat 103 1. Find the names of sailors who have reserved boat 103. 𝜋sname (𝜎bid=103 (Reserve ⋈ Sailor) 2. Find the names of sailors who have reserved a red boat. 𝜋sname(𝜎colour=”Red”(Sailor ⋈ Reserves ⋈ Boats)) 3. Find the colors of boats reserved by Lubber. 𝜋colour(𝜎sname=”Lubber”(Sailor ⋈ Reserves ⋈ Boats)) 4. Find the names of sailors who have reserved at least one boat. 𝜋sname(Sailor ⋈ Reserves) 5. Find the names of sailors who have reserved a red or a green boat. 𝜋sname(𝜎colour=”Red” or “Green” (Sailor ⋈ Reserves ⋈ Boats)) 6. Find the names of sailors who have reserved a red and a green boat. 𝜋sname(𝜎colour=”Red”(Sailor ⋈ Reserves ⋈ Boats)) ∩ 𝜋sname(𝜎colour”Green” (Sailor ⋈ Reserves ⋈ Boats)) 7. Find the sids of sailors with age over 20 who have not reserved a red boat. 𝜋sid(𝜎 Age>20 And Colour ≠ “Red” (Sailor ⋈ Reserves ⋈ Boats)) 8. Find the names of sailors who have reserved all boats. 𝜋sname(𝜎bid=101(Sailor ⋈ Reserves)) ∩ 𝜋sname(𝜎bid=102(Sailor ⋈ Reserves)) ∩ 𝜋sname(𝜎bid=103(Sailor ⋈ Reserves)) ∩ 𝜋sname(𝜎bid=104(Sailor ⋈ Reserves)) 9. Find the names of sailors who have reserved all boats called Interlake. 𝜋sname(𝜎bid=101(Sailor ⋈ Reserves)) ∩ 𝜋sname(𝜎bid=102(Sailor ⋈ Reserves)) 10.Find the names of sailors who have reserved at least two boats. 𝜋sname((𝜎sid ≠ 74 Reserve) ⋈ Sailor)
Field Guide to Tropical Reef Fishes of the Indo-Pacific: Covers 1,670 Species in Australia, Indonesia, Malaysia, Vietnam and the Philippines (with 2,000 illustrations)