The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 4 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
I need help with this database lab.It is attached in file.
Database and le Management Systems(CIS 2109)Lab 13 – Extra Credit (OpTonal)Due: End oF LabReFerences:(1) Chapters 6 and 7 in "Modern Database Management"(2)h±ps://www.tutorialspoint.com/plsql/plsql_triggers.htm(3)h±ps://www.tutorialspoint.com/plsql/plsql_FuncTons.htm(4)h±ps://www.tutorialspoint.com/plsql/plsql_procedures.htmNOTE on use of slash on last line:Because;are used for PL/SQL to end a statement;cannotbe used by SQLPLUS to mean "terminate the current statement, execute it and store it to theSQLPLUS buffer" because we want the whole PL/SQL block to be completely in the buffer, thenexecute it. PL/SQL blocks must end with:END;/For example, when using an interactive tool, a single slash (/) on the last line is necessary toactivate theCREATETRIGGERstatement.PreparaTon:Drop tables using query in Oracle Help.Connect to Oracle Database and execute the script: SQL2_scripts.sql.Part 01In this part you will learn how to create and use triggers:a.Create a table called Customer_Archives that has the same columns as customers tableand it also has a column that is called “DeleTon_Date”b.(Use reFerence 2)Create a ±rigger on table Customers so that every Tme a record isdeleted from table customers this same record is inserted in table Customer_Archiveswith the current date as DeleTon_Datec.Now insert a new customer into table Customers and then delete it. Is the recordinserted correctly into table Customers_Archive?Part 02 (Use reFerence 3)In this part we will learn how to use funcTons:a.Create a funcTon that has the Customer_id as input and returns a number thatrepresents the total cost of orders for this customer. NoTce that you will need to
Attachments: