Question
Answer the following questions based on the above database: 1, Create a view named ATL_CHARTERS_V that includes the following For each charter of aircraft to
Answer the following questions based on the above database:
1, Create a view named ATL_CHARTERS_V that includes the following For each charter of aircraft to Atlanta (STL), print the charter date, charter hours flown, and the corresponding customer last name, first name, area code, and phone number. Your answer should include both the SQL statement for view creating along with the contents of the view (you get the contents of the view by select * from ATL-CHARTERS_V).
- Modify the MODEL table to add the following attribute: (Note: use ALTER TABLE and UPDATE commands for this question.)
Attribute name | Attribute Description | Attribute type |
MOD_LIFT_ WEIGHT | Amount of weight each model can lift | Numeric |
Once the attribute has been added, update the values of all rows as per following values:
Attribute values for MOD_LIFT_WEIGHT |
10,000 for Mod_code = DC-90A |
5,000 for Mod_code = MA23-250 |
20,000 for Mod_code = PA31-950 |
- Create a trigger named trg_charter_hours that will automatically update the AIRCRAFT table after a new CHARTER row is added. Use the CHARTER tables CHAR_HOURS_FLOWN to update the AIRCRAFT tables AC_TTAF, AC_TTEL, and AC_TTER values.
The meaning for the AIRCRAFT table columns are as follows:
AC_TTAF: Total time on the air frame
AC_TTEL: Total time on the left engine (Also used to record single engine hours) AC_TTER: Total time on the right engine.
So in the trigger, you need to increase all of them with value of CHAR_HOURS_FLOWN
CHAR TRP CHAR DATE AC NUMBER CHAR DESTNATION CHAR DISTANCE CHAR HOURS FLOWN CHAR HOURS WAIT CHAR-TOT CHGMAR OL OTS CUS CODE OOTSTable name: EARNEDRATING RTG CODE EARNRTG DATE Table name: CREW Table name: CUSTOMER CHAR TRP BMP M CREW J08 CUS CODE CUS LNAME CUS FNAME CUS NTIAL CUS AREACODE CUS PHONE CUS, BALANCE 0 1285.19 Table name: RATING Certified Flight Instructor Certified Flight Instructor, Instrument 382-7185 Mutiengine Land Table name: EMPLOYEE EMPNLM EMPTITLE EMP-LNAME EMP-FNAME -BP-NTAL EMP-De BPHRE-DATE 10011 104 Coplit 19-Mar-196525-Apr-1988 Table name: MODEL 14 Nov-1958 20.0c-1992 M CODE MOO MANUFACTURER MOO NME 16-Oct-1974 g-2005 Beechcra 1 20-0dt-1996 PA23-250 Piper 4-Mar-1975 08-Jan-2006 PA31-350 Piper Navajo Chieftain 18-Nov-1994 Eizabeth 9-May-1970 01-Dec-1992Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started