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

  In this problem we will consider a movie database with

in this problem we will consider a movie database with three tablesmoviedirectortitle director yearmoviecasttitle actor

  Write a select statement that returns the productname

Write a SELECT statement that returns the ProductName and ListPrice columns from the Products table.

  When should wildcard characters used in queries

When should wildcard characters used in queries and list the six types of wildcard characters that can be used in Access queries?

  Write a select statement that returns these column names

Write a SELECT statement that returns these column names and data from the Products table:

  Design new transaction by sql statements

Code SQL statements to update view as follows: change spelling of Mark Tobey to Mark Toby. Design new Transaction for Mark Toby. Suppose you have essential transaction, work, and customer data.

  Describe what is a sequence

What is a sequence. Which clause of a sequence cannot be changed with an alter statement

  Write a sql statement to return some columns

Prepare this SQL query and sort the result set by CategoryName and then by ProductName in ascending order- Write a SQL statement to return some columns

  Write programme in oracle to make employee table

List the employee_id and employee_name of the employees form the l_employees table with the top 4 credit limits.

  How primary and foreign-key relationships are applied

At this point, you will add data to your database and validate that they loaded properly. In tabular format, include 3 rows for each table, making sure that the primary-key and foreign-key relationships are properly applied.

  Create a problem definition for williwonk

Create a problem definition for Williwonk's, as described in Problem 1. Estimate the weights of importance. Include at least one requirement and one constraint.

  Create account, email confirmation, and account activation

Chosen User Identifier for the account - System must ensure the user id is at least 5 characters, and no existing accounts with the same user id- If same user id exists, System must require User to choose another user id

  Pretend that you are on the boards

Pretend that you are on the boards of the American National Standards Institute (ANSI) and the International Organization for Standards (ISO), two of the organizations who standardized SQL

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