
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question

Transcribed Image Text:Task 2
Stored PL/SQL procedure
Implement a stored PL/SQL procedure PARTSUPPLIER that lists information
about the supplier key and supplier name supplying parts. The procedure first
computes the total number of suppliers supplying the specified part. The
procedure then extracts the supplier's information supplying the specified part.
The information to be displayed include the part key, part name, the supplier
key and the supplier's name. An example of a segment of the output for the
list of suppliers supplying a specified part (part 59396) is as follow:
part key: 59396, orange cream sandy lavender drab
Number of suppliers supplying the part: 4
supplier Key
166 Supplier#000000166
935 Supplier#000000935
1704 Supplier#000001704
2397 Supplier#000002397
supplier Name
It is up to you to decide if you want to handle exception in your procedure.
Deliverables
Submit your spooled file solution2.lst (or solution2.pdf) that contains your SQL script
and the output from the execution of the script. The report must have no errors
related to the implementation of your task and it must list all PL/SQL and SQL
statements processed.
Remember to set ECHO option of SQL*Plus to ON!

Transcribed Image Text:Task 3
Stored trigger
Implement a row trigger that enforces the following consistency constraint.
The column c_comment in the relational table CUSTOMER of the TPCHR
benchmark database is defined as 'NOT NULL'. Create a row trigger that
automatically updates the values in the column (c_comment) to 'New customer
was created on <the system date>' if the comment of the newly inserted record
is left as NULL when a new customer is inserted into the relational table
CUSTOMER. Your trigger, once activated, will enforce the consistency constraint
described.
When ready, process the SQL script solution2.sql and record the results of
processing in a file solution2.Ist.
Deliverables
Hand in the SQL script and the report from execution of scripts.
Remember to set ECHO option of SQL*Plus to ON!
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- On the Faculty Data worksheet, in cell J3, use an IFS function to calculate the retirement matching dollar amount for each faculty member participating in the retirement plan. If the participating member is a Full Professor, the matching amount is 4% of the salary. Otherwise, the matching amount is 3% of the salary. If the member is not participating, show a blank.arrow_forwardWrite a stored procedure called sp_apply_discount() that will apply percent discount to books in a subject. The stored procedure takes in 2 parameters, percentDiscount (DECIMAL(8,2)) and subject (VARCHAR(120)). Using these parameters, the stored procedure computes the discount for the book cost and stores it in the FINAL_PRICE field. For example, the following stored procedure call: call sp_apply_discount(0.15, 'Database');would compute 15% percent discount from the book cost in the Database subject category and store it in the FINAL_PRICE column as depicted in this image:arrow_forwardCreate a stored procedure that will return the number of customers in a given state. The parameter for your stored procedure should accept the state abbreviation ('UT') and return the results of a query that returns the number of customers in that state.arrow_forward
- Richardson Ski Racing (RSR) sells equipment needed for downhill ski racing. One of RSR's products is fencing used on downhill courses. The fence product comes in 150-foot rolls and sells for $215 per roll. However, RSR offers quantity discounts. The following table shows the price per roll depending on order size: Quantity Ordered To Price per Roll From 1 70 $215 71 140 $195 141 280 $175 281 and up $155 Click on the datafile logo to reference the data. DATA file (a) Use the VLOOKUP function with the preceding pricing table to determine the total revenue from these orders. (b) Use the COUNTIF function to determine the number of orders in each price bin. From Number of To Price per Roll 70 $215 !!! 140 $195 280 $175 and up $155 1 71 141 281 Orders 172arrow_forwardIf we implement a queue using an array where we treat the array as if its two ends are "taped together", we call that a linear array. O True Falsearrow_forwardQ1. Write a SELECT statement that returns these columns from the Invoices table: The invoice _total column A column that uses the ROUND function to return the invoice_total column with 1 decimal digit A column that uses the ROUND function to return the invoice_total column with no decimal digits Q1. Write a SELECT statement that returns these columns from the Invoices table: • The invoice_total column • A column that uses the ROUND function to return the invoice_total column with 1 decimal digit • A column that uses the ROUND function to return the invoice_total column with no decimal digits invoice_total one digit 3813.33 3813.3 zero_digits 3813arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education