Question: 1) Create a trigger named trg_cust_balance that will automatically update the CUSTOMER tables CUS_BALANCE when a new CHARTER row is added. Use the CHARTER tables
1) Create a trigger named trg_cust_balance that will automatically update the CUSTOMER tables CUS_BALANCE when a new CHARTER row is added. Use the CHARTER tables CHAR_TOT_CHG as the update source (Assume that all charter charges are charged to the customer balance.) In addition to the CHAR_TOT_CHG, add $5 for every quart of oil used on the charter.
2) Create a stored procedure to update model charge per mile attribute. Procedure takes the model number as a parameter. The procedure increases the charge for this model by 20%.
3) Create a stored procedure that will take an Employee number and percentage, then update the corresponding employees hourly salary by the input percentage (increase the hourly salary, so you are giving the employee a raise).

Database name: Ch08AviaCo Table name: CHARTER CHAR TRP CHAR DATE AC NUMBER CHAR DESTINATION CHAR DISTANCE CHAR HOURS FLOWN CHAR HOURS WAIT CHARTOH HAR OL QTS CUS CODE 001Table name: EARNEDRATING 10001 05-Feb-08 2289 0002 05-Feb-08 2778 10003 05-Feb-08 4278Y 10004 06-Feb-08 1484 10005 06-Feb-08 2289 10006 06-Feb-08 4278Y 10007 06-Feb-08 2778V 10008 07-Feb-08 1484P 0009 07-Feb-08 2289 0010 07-Feb-08 4278Y 10011 07-Feb-08 1484P 10012 08-Feb-08 2778W 0013 08-Feb-08 4278 10014 09-Feb-08 4278Y 0015 09-Feb-08 2289 10016 09-Feb-08 2778V 10017 10-Feb-08 1484P 10018 10-Feb-08 4278Y 10016EMP NM RTO CODE EARNRTO DATE 18-Feb-98 15-Dec-0 10019 10011 10017 10012 10014 10017 10016 10012 10010 10011 10017 10016 5.7 101 INSTR 1574 644 1574 21-Apr-93 is ul-96 TYS 104 INSTR ENA 18-Nov-97 17-Apr-95 1055 10014 TYS Table name: CREW Table name: CUSTOMER . CUS-CODE CUS-LNAME-CUS-FNAME-CUS-NTIAL-CUS-AREACODE-CUS 109 INSTR 09 MEL AR.TRP ? EMP-MM -CREVv-ce l Kelas-BALANCE 05-Feb-96 10010 Ramas 0011 Dunne 10012 Smith 10013 Olowski 0014 Orlando Myron 0015 O'Brian 10016 Brown 10017 Wllas George 10018 Farriss 10019 Smith 844-2573 109 SES 1285.19 Table name: RATING 894-2180 0004 0005 10006 222-1672 297-1228 382-7185 RTG CODE 1014.56 Certified Flight Instructor Certified Flight Instructor,Instrument Copllot Single Engine, Land Single Engine, Sea Table name: EMPLOYEE 100 Mr 15-Jun-1942 15-Mar-1987 19-Mar-196525-Apr-1988 Table name: MODEL 102 Mr MOD-CODE?MOOMAUFACTURER? MOO-NAME | MO.SEATS? MOD-CHO.MLE 16-Oct-1974 28-Aug-2005 08-Nov-1971 4-Mar-1975 08-Jan-2006 PA31-35o Piper 12-Feb-1968 05-Jan-1991 21-Aug-1974 02- 1996 14-Feb-1966 18-Jun-196114-Apr-199 9-May-197001-Dec-1992 200t199 PA23-250 Pper 04 M 105 Mr 106 Mrs 107 Mr 108 Mr Coplot Navejo Chieftain Duzak 8-Nov-1994 Table name: AIRCRAFT AC NUMBER MOD CODE AC TTAF AC TEL AC TER EMP NUM PL LICENSE PL RATINGS Table name: PILOT P PL_MED TYPE PL_MED DATE PL PT135_DATE ATPISELMELAnstriCFI 24387689 123.4 79929 1513.1 04 ATP 105 COM 106 COM 109 COM 17-Jan-08 05-Jan-08 02-Jan-08 02-Feb-08 PA31-350 PA31-350
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
