Question 1. Write a script that creates and calls a stored procedure named insert_category. First, code a statement that creates a procedure that adds a new row to the Categories table. To do that, this procedure should have one parameter for the category name. Code at least two CALL statements that test this procedure. (Note that this table doesn’t allow duplicate category names.)
Question 2. Write a script that creates and calls a stored function named discount_price that calculates the discount price of an item in the Order_Items table (discount amount subtracted from item price). To do that, this function should accept one parameter for the item ID, and it should return the value of the discount price for that item.
Question 3. Write a script that creates and calls a stored function named item_total that calculates the total amount of an item in the Order_Items table (discount price multiplied by quantity). To do that, this function should accept one parameter for the item ID, it should use the discount_price function that you created in exercise 2, and it should return the value of the total for that item.
Question 4. Write a script that creates and calls a stored procedure named insert_products that inserts a row into the Products table. This stored procedure should accept five parameters, one for each of these columns: category_id, product_code, product_name, list_price, and discount_percent. This stored procedure should set the description column to an empty string, and it should set the date_added column to the current date. If the value for the list_price column is a negative number, the stored procedure should raise an error that indicates that this column doesn’t accept negative numbers. Similarly, the procedure should raise an error if the value for the discount_percent column is a negative number. Code at least two CALL statements that test this procedure.
Question 5. Write a script that creates and calls a stored procedure named update_product_discount that updates the discount_percent column in the Products table. This procedure should have one parameter for the product ID and another for the discount percent. If the value for the discount_percent column is a negative number, the stored procedure should raise an error that the value for this column must be a positive number. Code at least two CALL statements that test this procedure.
The following employees of CIBA Ironworks in Bristol, Illinois, are paid in different frequencies. Some employees have union dues and/or garnishments deducted from their ...Aug 11 2020
Suppose Latasha is choosing how to allocate her portfolio between two asset classes: risk-free government bonds and a risky group of diversified stocks. The following tab...Apr 30 2020
In many problems in previous chapters, cars and other objects that roll on wheels were considered to act as if they were sliding without friction. (a) Can the same ass...Apr 02 2020
The measure of risk is best described asa. the potential lossb. the variability of outcomes around some expected valuec. the probability of expected valuesd. the potentia...Dec 01 2019
Problem 1 On October 1, 2018, Adriana Lopez launched a computers ervices company called Success Systems, which provides consulting services, computer system installations...May 22 2020
Seether, Inc., has the following two mutually exclusive projects available. Year __________Project R ___________Project S 0 .................. -$55,000 .....................Apr 30 2020
Alameda Products uses a job-order costing system. The company’s inventory balances on April 1, the start of it’s fiscal year, were as follows: Raw Materials: $26,000 Work...Apr 01 2020
16 Vector Calculus: Problem 11 Previous Problem Problem List Next Problem (1 point) Find a parametrization of the circle of radius 5 in the xy-plane, centered at (-4,1), ...Apr 19 2021
Choose one and provide a short paragraphGreat BasinCaliforniaNorthwest CoastalPrairies/PlainsNortheastSouthwestArtic/SubarcticIn your chosen culture area, provide at leas...Apr 17 2020