salary_grade_id INTEGER CONSTRAINT salary_grade_pk PRIMARY KEY, low_salary NUMBER(6, 0), high_salary NUMBER(6, 0));CREATE TABLE purchases_with_timestamp ( product_id INTEGER REFERENCES products(product_id), customer_id INTEGER REFERENCES customers(customer_id), made_on TIMESTAMP(4));CREATE TABLE purchases_timestamp_with_tz ( product_id INTEGER REFERENCES products(product_id), customer_id INTEGER REFERENCES customers(customer_id), made_on TIMESTAMP(4) WITH TIME ZONE);CREATE TABLE purchases_with_local_tz ( product_id INTEGER REFERENCES products(product_id), customer_id INTEGER REFERENCES customers(customer_id), made_on TIMESTAMP(4) WITH LOCAL TIME ZONE);CREATE TABLE coupons ( coupon_id INTEGER CONSTRAINT coupons_pk PRIMARY KEY, name VARCHAR2(30) NOT NULL, duration INTERVAL YEAR(3) TO MONTH);CREATE TABLE promotions ( promotion_id INTEGER CONSTRAINT promotions_pk PRIMARY KEY, name VARCHAR2(30) NOT NULL, duration INTERVAL DAY(3) TO SECOND (4));CREATE TABLE order_status ( order_status_id INTEGER CONSTRAINT default_example_pk PRIMARY KEY, status VARCHAR2(20) DEFAULT 'Order placed' NOT NULL, last_modified DATE DEFAULT SYSDATE);CREATE TABLE product_changes ( product_id INTEGER CONSTRAINT prod_changes_pk PRIMARY KEY, product_type_id INTEGER CONSTRAINT prod_changes_fk_product_types REFERENCES product_types(product_type_id), name VARCHAR2(30) NOT NULL, description VARCHAR2(50), price NUMBER(5, 2));CREATE TABLE more_products ( prd_id INTEGER PRIMARY KEY, prd_type_id INTEGER REFERENCES product_types(product_type_id), name VARCHAR2(30) NOT NULL, available CHAR(1));CREATE TABLE more_employees ( employee_id INTEGER CONSTRAINT more_employees_pk PRIMARY KEY, manager_id INTEGER CONSTRAINT more_empl_fk_fk_more_empl REFERENCES more_employees(employee_id), first_name VARCHAR2(10) NOT NULL, last_name VARCHAR2(10) NOT NULL, title VARCHAR2(20), salary NUMBER(6, 0));CREATE TABLE divisions ( division_id CHAR(3) CONSTRAINT divisions_pk PRIMARY KEY, name VARCHAR2(15) NOT NULL);CREATE TABLE jobs ( job_id CHAR(3) CONSTRAINT jobs_pk PRIMARY KEY, name VARCHAR2(20) NOT NULL);CREATE TABLE employees2 ( employee_id INTEGER CONSTRAINT employees2_pk PRIMARY KEY, division_id CHAR(3) CONSTRAINT employees2_fk_divisions REFERENCES divisions(division_id), job_id CHAR(3) REFERENCES jobs(job_id), first_name VARCHAR2(10) NOT NULL, last_name VARCHAR2(10) NOT NULL, salary NUMBER(6, 0));CREATE TABLE all_sales ( year INTEGER NOT NULL, month INTEGER NOT NULL, prd_type_id INTEGER CONSTRAINT all_sales_fk_product_types REFERENCES product_types(product_type_id), emp_id INTEGER CONSTRAINT all_sales_fk_employees2 REFERENCES employees2(employee_id), amount NUMBER(8, 2), CONSTRAINT all_sales_pk PRIMARY KEY ( year, month, prd_type_id, emp_id ));CREATE TABLE product_price_audit ( product_id INTEGER CONSTRAINT price_audit_fk_products REFERENCES products(product_id), old_price NUMBER(5, 2), new_price NUMBER(5, 2));CREATE TABLE reg_exps ( id NUMBER CONSTRAINT reg_exps_pk PRIMARY KEY, text VARCHAR2(512) NOT NULL);-- create the PL/SQL codeCREATE PROCEDURE update_product_price( p_product_id IN products.product_id%TYPE, p_factor IN NUMBER) AS v_product_count INTEGER;BEGIN -- count the number of products with the -- supplied product_id (will be 1 if the product exists) SELECT COUNT(*) INTO v_product_count FROM products WHERE product_id = p_product_id; -- if the product exists (v_product_count = 1) then -- update that product's price IF v_product_count = 1 THEN UPDATE products SET price = price * p_factor WHERE product_id = p_product_id; COMMIT; END IF;EXCEPTION WHEN OTHERS THEN ROLLBACK;END update_product_price;/CREATE FUNCTION circle_area ( p_radius IN NUMBER) RETURN NUMBER AS v_pi NUMBER := 3.1415926; v_area NUMBER;BEGIN -- circle area is pi multiplied by the radius squared v_area := v_pi * POWER(p_radius, 2); RETURN v_area;END circle_area;/CREATE FUNCTION average_product_price ( p_product_type_id IN INTEGER) RETURN NUMBER AS v_average_product_price NUMBER;BEGIN SELECT AVG(price) INTO v_average_product_price FROM products WHERE product_type_id = p_product_type_id; RETURN v_average_product_price;END average_product_price;/CREATE PACKAGE product_package AS TYPE t_ref_cursor IS REF CURSOR; FUNCTION get_products_ref_cursor RETURN t_ref_cursor; PROCEDURE update_product_price ( p_product_id IN products.product_id%TYPE, p_factor IN NUMBER );END product_package;/CREATE PACKAGE BODY product_package AS FUNCTION get_products_ref_cursor RETURN t_ref_cursor IS v_products_ref_cursor t_ref_cursor; BEGIN -- get the REF CURSOR OPEN v_products_ref_cursor FOR SELECT product_id, name, price FROM products; -- return the REF CURSOR RETURN v_products_ref_cursor; END get_products_ref_cursor; PROCEDURE update_product_price ( p_product_id IN products.product_id%TYPE, p_factor IN NUMBER )