a) Create a new database as test.db. Create the tables with the following schema using DDL commands. Sailors (sid: PK, sname: must be unique, rating: Between 0 and 5, age) Boats (bid: PK, bname, color...


a) Create a new database as test.db. Create the tables with the following schema using<br>DDL commands.<br>Sailors (sid: PK, sname: must be unique, rating: Between 0 and 5, age)<br>Boats (bid: PK, bname, color (Must be blue or black only)<br>Reserves (rid: PK, sid: FK, bid: FK, date: Default value: current date.)<br>Note: If the record from boats is updated, its value should be set null in Reserves.<br>b) Apply following queries.<br>1) A new reservation of boat with id 208 and sailor with id S03 has been done on 2019-12-26. Store thi.<br>data.<br>2) Find all the sailors with a rating below 3.<br>3) Create a view that will display the names of sailors who have reserved boat with id 109.<br>4) Find the boat ids that are not reserved.<br>5) Add a new column design to the Boat table.<br>6) Show the names of sailor and color of boat who have reserved black color boat.<br>7) Delete the reservations made on date 2019-10-12.<br>8) Find the average age of all sailors.<br>

Extracted text: a) Create a new database as test.db. Create the tables with the following schema using DDL commands. Sailors (sid: PK, sname: must be unique, rating: Between 0 and 5, age) Boats (bid: PK, bname, color (Must be blue or black only) Reserves (rid: PK, sid: FK, bid: FK, date: Default value: current date.) Note: If the record from boats is updated, its value should be set null in Reserves. b) Apply following queries. 1) A new reservation of boat with id 208 and sailor with id S03 has been done on 2019-12-26. Store thi. data. 2) Find all the sailors with a rating below 3. 3) Create a view that will display the names of sailors who have reserved boat with id 109. 4) Find the boat ids that are not reserved. 5) Add a new column design to the Boat table. 6) Show the names of sailor and color of boat who have reserved black color boat. 7) Delete the reservations made on date 2019-10-12. 8) Find the average age of all sailors.

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here