Define exception handlers in programming

Assignment Help PL-SQL Programming
Reference no: EM13930285

Part 1

Now that business is becoming strong and the movie stock is growing for More Movie Rentals, the manager wants to do more

inventory evaluations. One item of interest concerns any movie for which the company is holding $75 or more in value. The

manager wants to focus on these movies in regards to their revenue generation to ensure the stock level is warranted. To

make these stock queries more efficient, the application team decides that a column should be added to the MM_MOVIE table

named STK_FLAG that will hold a value '*' if stock is $75 or more. Otherwise the value should be NULL. Add the needed column

and create an anonymous block that contains a CURSOR FOR loop to accomplish the task. The company will run this program

monthly to update the STK_FLAG column before the inventory evaluations.

Make sure that you display the table structure of MM_MOVIE using DESC, and SELECT all data from this table before and after

you do this exercise to show the effect of your block.

Submit all code and Oracle responses. Before submitting, edit your document to remove erroneous attempts.

Part 2

Here is a block that retrieves the movie title and rental count based on a movie id provided via a host variable.

SET SERVEROUTPUT ON

VARIABLE g_movie_id NUMBER

BEGIN

:g_movie_id := 4;

END;

/

DECLARE

v_count NUMBER;

v_title mm_movie.movie_title%TYPE;

BEGIN

SELECT m.movie_title, COUNT(r.rental_id)

INTO v_title, v_count

FROM mm_movie m, mm_rental r

WHERE m.movie_id = r.movie_id

AND m.movie_id = :g_movie_id

GROUP BY m.movie_title;

DBMS_OUTPUT.PUT_LINE(v_title || ': ' || v_count);

END;

/

Add exception handlers for errors that you can and cannot anticipate. Test the block by running it with various values of the

host variable.


Attachment:- Lab 1a results.doc

Reference no: EM13930285

Questions Cloud

Basic research design issues : What are the basic research design issues? Describe them in some detail.
Calculate the trend-cycle and monthly seasonal indices : Use a classical multiplicative decomposition to calculate the trend-cycle and monthly seasonal indices. Do the results support the graphical interpretation from part (a)?
Summarize basic principles of solution-focused brief therapy : Summarize the basic principles of Solution-Focused Brief Therapy (SFBT). Be sure you describe the main techniques used in this method of family therapy. Does this model of family therapy fit with the other models you have studied?
Unconventional monetary policy : Explain why some central banks have decided to undertake unconventional monetary policy in the form of quantitative easing.
Define exception handlers in programming : Add exception handlers for errors that you can and cannot anticipate. Test the block by running it with various values of the host variable.
Does the homogeneous box of mass m slip or tip first : The magnitude of force P is slowly increased. Does the homogeneous box of mass m slip or tip first? State the value of P which would cause each occur- rence. Neglect any effect of the size of the small feet.
Estimate the seasonal indices and the trend : Use a classical multiplicative decomposition to estimate the seasonal indices and the trend. Comment on these results and their implications for forecasting.
Immediate policy decision : Before turning to its immediate policy decision, the Committee discussed financial market developments; the international economy; money, credit, demand and output; and supply, costs and prices.
Examine the major design flaws and features of the airline : Describe the key factors that constitute a user friendly check-in experience. Examine the major design flaws and features of the airline you researched. Recommend one (1) feature you would like to add or eliminate

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Test and compile the sql queries

The Strayer Oracle Server may be used to test and compile the SQL Queries developed for this assignment. Your instructor will provide you with login credentials to a Strayer University maintained Oracle server.

  Create report using wizard or based on sql query

Create a report using the wizard or based on an SQL query that that shows Courses that instructors are approved to teach. Show Course Number, First Name, and Last Name of Instructor.

  Write a select statement that returns two columns

Write a SELECT statement that returns these two columns - CategoryName The CategoryName column from the Categories table

  Use the provided appbdbcreatesql sql script to create the

use the provided appbdbcreate.sql sql script to create the database to be used when working on this assignment.question

  Create database of customers table

1) Add 10 customers to the database using the Customers table. Show the table, including the SQL Code.2) Using SQL query, update more than one element in a customer record. Show before and after data, including the SQL code.

  Convert the er/eer model

To represent a problem description given in natural language as an (Enhanced) Entity -Relationship model; to convert the ER/EER model into a relational data model;

  Script that creates and calls a function

Write a script that creates and calls a function named fnItemTotal that calculates the total amount of an item in the OrderItems table (discount price multiplied by quantity)

  Update stock levels when the order is cancelled

Execute queries to confirm that the basket order status and product stock levels have been appropriately modified by the trigger - the trigger needs to fire when a new status record is added to the BB_BASKETSTATUS table and when the IDSTAGE col..

  Write command to list all the employees in year

Write the command to list all the employees hired in 2003 and 2004. Sort the rows by the hire_date column in descending order.

  Write an update statement that modifies the row

Write an UPDATE statement that modifies the row you just added to the Categories table. This statement should change the ProductName column to "Woodwinds", and it should use the CategoryID column to identify the row.

  Play a significant role in the sql injection attack steps

Examine the critical manner in which different database systems (e.g., Oracle, MySQL, or Microsoft SQL Server-based, etc.) can play a significant role in the SQL injection attack steps.

  Application which tests the random number generation

Write a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd