COMP214 FinalExam Practical (Lab) F2023 Version1
COMP214 FinalExam Practical (Lab) F2023 Version1
Version 1
WEIGHTING: Overall 15% from both Final Theory Quiz and Lab test totals
Instructions:
1. Add your name on this Word File when you are submitting.
2. Always include copy paste version of your code and as well as Screen
shot of code execution.
3. * To detect Plagiarism, instructor has all the rights to use some
applications (TurnItIn). If any cloned&copied work among classmates
is being detected then students that they involved are subject to
Centennial College’s Code of Academic Conduct document located
below.
4. * Please refer respected note about Plagiarism and Academic integrity
from our Course Outline
https://library.centennialcollege.ca/help-services/research-help/academic-integrity/
Quesiton 1 (15 points)
Create a table named BB_PRODUCTCHG_LOG to hold the relevant data, and then create a
trigger named TRG_Brewery_AUDIT_LOG that fires an update to this table whenever a
specified column in the BB_PRODUCT table changes.
Preparation :
Step3: Your Trigger code comes here. Make sure you compile your trigger without any
syntax error
Step5: Test with SELECT statement to see any record goes into LOG table
Write a function to accept 2 input number parameters one for base and one for height…
Show test results… Execute or call or use this function as part of SELECT statement and pass
2 separate numbers then show the screen shot of result for different triangles
BEGIN
END;
/
TEST:
(20 Points)
Write a stored function called postcode_exist that takes in a VARCHAR2(5) as parameter and returns a
Boolean (True or False) value. The function will return TRUE if the zipcode passed into it does not exist. It
will return a FALSE if the zipcode exists.
Please copy paste the entire below section to your PL/SQL editor and run them as whole
script by highlighting them all.
(ZIP VARCHAR2(5)
,CITY VARCHAR2(25)
,STATE VARCHAR2(2)
,CREATED_BY VARCHAR2(30)
,CREATED_DATE DATE
,MODIFIED_BY VARCHAR2(30)
,MODIFIED_DATE DATE
/
INSERT INTO zipcode VALUES ('00914','Santurce','PR','AMORRISO',TO_DATE('03-AUG-2007 00:00:00','DD-MON-YYYY
HH24:MI:SS'),'ARISCHER',TO_DATE('24-NOV-2007 00:00:00','DD-MON-YYYY HH24:MI:SS'));
l_count NUMBER;
BEGIN
SELECT COUNT(*)
INTO l_count
FROM ZIPCODE
END postcode_exist;
DECLARE
zip_exists BOOLEAN;
BEGIN
IF zip_exists THEN
ELSE
END IF;
END;