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: | 327 Weeks Ago, 5 Days Ago |
| Questions Answered: | 12843 |
| Tutorials Posted: | 12834 |
MBA, Ph.D in Management
Harvard university
Feb-1997 - Aug-2003
Professor
Strayer University
Jan-2007 - Present
Provide screenshots and PL/SQL code which demonstrate your log_changes_to_cc_trigger you
wrote in the top portion of the lab works properly, Specifically. I would like you to make 4 credit
card changes total to 2 different customers (and not customer id 25). Be sure to include update
statements and outputs for both tables.
2. Alter the CUSTOMERS table adding a column for email address. Call it CUSTOMER_EMAIL allow
nulls on this column.
3. Write a trigger called fix_customer_email_trigger which before the update or insert of data will
convert the email address to lowercase. That way if the customer inserts M..e@GMAIL.COM
the value m..e@gmail.com will be written to the table instead.
4. Demonstrate your trigger works by adding updating a few customers with email addresses. Be sure
to use mixed- case in the email addresses (e.g. M..e@GMAIL.COM) so you can demonstrate
your trigger automatically shapes the data to m..e@gmail.com for example.
5. Write a trigger called cleanup_phone_numbers_trigger which removes all of the extraneous
characters which might normally be input into a phone or fax number. For example if the user
inputs (505) 223 – 6784 then the trigger should save that into the database as simply
5052236784. This trigger should operate on the customers table and only affect the phone and
fax columns. HINT: you will need to use the Oracle regexp_replace function and here’s an hint /
example of how to use it to accomplish this task:
6. Write SQL code which demonstrates your trigger written in the previous question works properly.
7. What is a timing condition? List the 3 DML Events which can be part of a trigger’s timing
condition.
8. What are the correlation identifiers and what is their purpose?