
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
Question
Create an Oracle sequence named CUST_NUM_SEQ to generate values for customer
numbers. The sequence should start with the value 2000.
Create an Oracle sequence named INV_NUM_SEQ to generate values for invoice
numbers. The sequence should start with the value 9000.
Create a trigger named trg_updatecustbalance to update the CUST_BALANCE in
the CUSTOMER table when a new invoice record is entered. (Assume that the sale
is a credit sale.) Whatever value appears in the INV_AMOUNT column of the new
invoice should be added to the customer’s balance. Test the trigger using the following
new INVOICE record, which would add 225.40 to the balance of customer
1001:
8005, 1001, '27-APR-18', 225.40
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 3 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
- Q1. Create a stored procedure that will list all customers (name and number) represented by rep 15. (SQL)arrow_forwardPlease use sql to answer the follwoing question (an erd has also been add) Task 2: Task: UPDATE all employees salary in department 40 or 60 depending on their current salary range. Create a cursor and load all the records belongs to employees who works in department either in 40 or 60 a) Include employee_id, last_name, department_id and salary in Cursor SELECT Cursor cur_emp1 IS SELECT employee_id, last_name, department_id, salary FROM EMPLOYEES WHERE department_id IN (40,60); b) Now inside BEGIN and END block create CURSOR FOR LOOP with k keyword. FOR k IN cur_emp1 LOOP END LOOP; now inside above for loop check each records salary IF If employee salary is less than 5000 then add 20% of their salary and update actual phsyical table update employees SET salary= salary*1.20 WHERE employee_id = k.salary; Else if if employee salary is less then 8000 add 15% update employees SET salary=…arrow_forward
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