Database II    Sample Final            

 

 

1..   Write a PL/SQL procedure to reduce the Amount_due in the bookings table by a   

percent that’s passed as a parameter  in bookings for which the Rental_period is over 30 days.

 

2.   Write a trigger that automatically computes total miles driven by a customer before booking a car and displays the result on the screen.

 

3. Write a procedure to display three (3) records  Car_group_name and Rate_per_day  values that have the lest expensive   Rate_per_day  values listed in ascending order.

 

4. Outline the steps required to connect from Perl to an Oracle database and submit SQL commands to the database.

 

5. Write a login subroutine in Perl. It accepts a user name and password from the key board and checks against a list of user names and passwords in a text file. If there is a match it returns true else it returns false.

 

6. Describe how you would extend the solution to problem 5. to be used as a login to a web site.

 

7. Usind Perl CGI code how would you fetch a record from a text file that matches a person’s name and display the record(s) on a web page. Assume you input the name of the person in a text field of a web form.  You need not write the code, just outline the steps.