Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a package that uses packaged variables to assist in the user logon process. When a returning shopper logs on, the username and password entered

Create a package that uses packaged variables to assist in the user logon process. When a returning shopper logs on, the username and password entered will need to be verified against the database. In addition, two values need to be stored in packaged variables for reference during the user session: the shopper ID and the first three digits of the shopper's zip code (used for regional advertisements displayed on the site).

Create a function that accepts a username and password as arguments and verifies these values against the database for a match. If a match is found, return the value Y. Set the value of the variable holding the return value to N. Include a NO_DATA_FOUND exception handler to display a message that the logon values are invalid.

Use an anonymous block to test the procedure, using the username gma1 and the password goofy.

Now place the function in a package, and add code to create and populate the packaged variables specified earlier. Name the package LOGIN_PKG.

Use an anonymous block to test the packaged procedure, using the username gma1 and the password goofy to verify that the procedure works correctly.

Use DBMS_OUTPUT statements in an anonymous block to display the values stored in the packaged variables.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions

Question

13 What is CBI?

Answered: 1 week ago

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago