Question: Create a table UserChoice(p#, price) to store information about products (number and price) selected by a user. Leave the table UserChoice empty when first created.

Create a table UserChoice(p#, price) to store information about products (number and price) selected by a user. Leave the table UserChoice empty when first created.


Implement a stored PL/SQL procedure FindProducts(category, keyword) that finds all products categorized by the input parameter category and described by the input parameter keyword. For example, Find Products('book', 'database') will find all books that are described or related to 'database'. The procedure is to store the numbers and prices of all selected products in UserChoice table. Consider the following categories of products - book, video and cdrom when you test your procedure. 


To test your procedure, 


(i) implement SQL script that displays the contents of empty UserChoice table, 


(ii) execute CREATE OR REPLACE PROCEDURE statement to store Find Products in a data dictionary, and 


(iii) execute a stored procedure Find Products again to display the contents of nonempty UserChoice table.

Step by Step Solution

3.55 Rating (165 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Create UserChoice table CREATE TABLE UserChoice p INT price DECIMAL102 Implement stored PLSQL pr... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!