Write a stored function called new_student_id that takes in no parameters and returns a student.student_id%TYPE. The value returned will be used when inserting a new student into the CTA application. It will be derived by using the formula: student_id_seq.NEXTVAL.

Write a stored function called zip_does_not_exist that takes in a zipcode.zip%TYPE and returns a Boolean.The function will return TRUE if the zipcode passed into it does not exist. It will return a FALSE if the zipcode exists. Hint: An example of how it might be used is as follows:

CREATE OR REPLACE FUNCTION zipcode_does_not_exist (i_zipcode IN zipcode.zip%TYPE) RETURN BOOLEAN AS v_dummy char(1); BEGIN SELECT NULL INTO v_dummy FROM zipcode WHERE zip = i_zipcode; -- meaning the zipcode does exits RETURN FALSE; EXCEPTION WHEN OTHERS THEN -- the select statement above will cause an exception -- to be raised if the zipcode is not in the database. RETURN TRUE; END zipcode_does_not_exist;

3)

Create a new function. For a given instructor, determine how many sections he or she is teaching. If the number is greater or equal to 3, return a message saying the instructor needs a vacation. Otherwise, return a message saying how many sections this instructor is teaching.