Question: #1222

Using the Ch07 SaleCo database Complete Solution

Using the Ch07_SaleCo database .
1a. There is no referential integrity built into the Ch07_SaleCo database. Compensate for that by creating a trigger for inserts and updates on the INVOICE table that will check that the CUS_CODE does indeed exist in the CUSTOMER table and if not, avoid the insert or update operation and print a message to that effect. If it does exist, allow the process to proceed.
1b. Include two insert statements that cause your trigger to fire, one that fails validation and one that succeeds. (2 points)
2. Why is DBMS-enforced referential integrity preferred over the trigger created in #1? Be specific.

Solution: #1219

Using the Ch07 SaleCo database Complete Solution

DBMS-enforced referential integrity is preferred over the trigger...

Tutormaster
Rating: A+ Purchased: 11 x Posted By: Vikas
Comments
Posted by: Vikas

Online Users