Chat with us, powered by LiveChat PL/SQL Packages | WriteDen

PL/SQL Packages

PL/SQL Packages

    Refresh your database tables by running the movierental.sql script. This will restore all of the data back to where it was in the beginning for the course.
    Drop the two procedures and the function created in Lab 3. Be sure that you have your script file from Lab 3 so you can copy the procedure and function code from it.

Now you are ready to create your package specification. Your package name should be MM_RENTALS_PKG and it will contain the two procedures and the one function that were created in Lab 3. Remember that for the specification, you only need to list the procedure and function header data (CREATE statement with parameters).

Test your package specification by running the script in SQL*Plus. If you have any errors, debug them and once you have a clean compile, move on to Step 2.
Step 2: Creating the Package Body     

Creating the package body should be simple since you already have the code for the two procedures and the function, and you know it works. Remember that the name for the package body must match the name of the specifications, and that the procedure and function header in the body must match that of the specification exactly.

Once you have created the body then run the script in your SQL*Plus session. Once you have a clean compile then move on to Step 3 to do your testing.
Step 3: Testing the Package     

To test your package, you will need to run the same exact tests you did in Lab 3. The following outlines what you will test for:

Testing the first procedure –

    No movie for the ID supplied (use 13, 10, and 2 for the parameters).
    No member for the ID supplied (use 10, 20, and 2 for the parameters).
    No payment method for the ID supplied (use 10, 10, and 7 for the parameters).
    A successful rental (use 5, 10, and 2 for the parameters).
    No movie available for the ID supplied (use 5, 11, and 2 for the parameters). Since there is only one movie available for ID 5, you will get this exception.

Testing the second procedure –

    No rental for the ID supplied (use 20 for the parameter).
    A successful rental return (use 1 for the parameter).
    Try to return the same rental in Step 2.

Testing the function –

    Test for a movie in stock using movie ID 11.
    Test for a movie not in stock using movie ID 5 (from your tests of the second procedure above, the quantity should be 0).
    Test for an invalid movie ID using movie ID 20.

IMPORTANT: Remember that all of your testing needs to be saved in a spool session so that it can be submitted to the Dropbox for grading.
Step 4: Determining Dependencies     

Having created a package that contains program units to support the movie rental process is a major step in customizing the new database. As application modifications are made in the future, however, we need to be able to identify all object dependencies to test changes. For this step in the lab, you are to use either data dictionary views or the dependency tree utility found in Doc Sharing (utldtree.sql file) to compile a list of dependencies for all the More Movies database objects. Remember that an object is anything that was created using the CREATE statement. Present your finding in a separate Word document in a tabular format as in the following sample. Each dependency type should be listed as either direct or indirect.


Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of 

Step 1

To make an Order you only need to click ORDER NOW and we will direct you to our Order Page at WriteDen. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
 Deadline range from 6 hours to 30 days.

Step 2

Once done with writing your paper we will upload it to your account on our website and also forward a copy to your email.

Step 3
Upon receiving your paper, review it and if any changes are needed contact us immediately. We offer unlimited revisions at no extra cost.

Is it Safe to use our services?
We never resell papers on this site. Meaning after your purchase you will get an original copy of your assignment and you have all the rights to use the paper.


Our price ranges from $8-$14 per page. If you are short of Budget, contact our Live Support for a Discount Code. All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Please note we do not have prewritten answers. We need some time to prepare a perfect essay for you.