Question: Assignment 3 Instructions Create a database in SQLServer for the relational model provided in the HW3- Relational Schema file. Populate your database with some data



me 16 HW instruction Design Layout Reference Mag Review Helo Can Body - - A A A E B 214 Dal No Head Heading 2 wsgroh asignment Instructions Create a databasein Soforthe relational model provided in the HW Relational Schemat Fopulate your database with some data to test your database write the requested queries in Soc. The relational model that provided is part of the relational model from your HW 2. however it has been timplified The ER diagram for this relational modelis also provided to you in the Hwa_Data Modelle First create an Sol Server database by night clicking on the databasesfolder in the Object explorer and selecting the New Database option Name the database by the initials of your best names and then A3. For instance a database created by Johnson and white would be named as w_41 . write the SQL statements for creating the tables in your database, spediting catatypes and field lengths establishing primary Vays and forenkeys, and implementing at the necessary constraints Save your creke statements in a file. Urethe sameining convention you used to name your database to name your in your file also indude the folowing SQL statements 1 An sol statement to add constant to one of thetables 2. An solitatement to add column to one of the tables. An Statement to insert data to one of the tables 4 An SOL istement to modify the data in one of the tables A SOL statement to delete a row of data from one of the tables Populiste your database with sample data Write the following sol queries and save them in your file also. Put the question numbers above your queries, Q1, 02, etc. Ensure that your queries are corect and produce the results you expected i i passengers who live in Itanbulsorted by last name and then by first name 2. What is the number of passengers whose city was not specified... NULL)? 3. Display the Year Pasar Borttiamafor ships that visited the . ports 4 play he e Porto, Portucatordar for all the thips that have been used to cruise 5 ust the cruises which we more than 10 bookings? 6. Determine the total deckingtee for each cruise 7 Determine the total price pudbyesch passenger and display firstName Plastic and total price paid Which cruises havelstanbul the deatureport in the visit order should be egon toll Which passengers have visited Venice in dober 2015 (rents you may use the Month and functions on and Stoctober 2015) 10. What is the duration of each crust Hit Use the DATEDIFF function to determine the duration 13 Aramak iin buraya yan EH - G Share Com Find - Replace Select- Dictate Editor OK ab Astec ABC ABCD doba MaaboDE ABDICO ABCD De Subite En Emphis Intense Strong Quote Intense Editing Editor Sentity Voice 11. What is the number of bookings on each cruise? Display crueldand number of bookings 12. What is the average rating of all the cruises? 11. What is the average rating for cruise with Cruise SerialNo=1 14 Which cruises have an average rating greater than the overall average rating? Display quised and average rating 15. Display the ports visited by the truse, which has the longest duration (Display PortName, Port Country, and Cruise 16. List the ships which have not been assigned a cruise yet: 17. What is the average number of cruises that a ship sails? (Hint: write a subquery to calculate the count of cruises a ship sails, then using that as the data source take the average of the count of cruises) 18. Which port has the highest docking fee? Submit your SQL Server database creation queryfile and your select query file through LMS (one submission for each group) by the due date. Socus 1922 9.01.20 W3_Data 20Model pdf E A Sesli ovu v World Traveler Cruise Line SHIP Ship Number Ship Name Weight Year Built Passenger Capacity CRUISE Cruise Serial Number Sailing Date Retum Date VISITS Visit Order BOOKING Price Satisfaction itate PORT Port Port Name Country Docking Fee V PASSENGER Passenger Number Name (First Name, Middle Name, Last Namel Address Street Address City, State, Postal Code Country) o G + E A Sesli oku SHIP Shipid ShipName Weight YearBuilt Passenger Capacity CRUISE CruiseSerialNo Sailing Date ReturnDate Shipl Booking CruiseSerialNo Passenger Price Satisfactionate Passenger Passenger PFirstName PlastName PStreetAddress PCityPState PPostalCode PCountry VISIT CruiseSerialNo Portid VisitOrder PORT Portid PortName PortCountry Docking Fee
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
