Create a trigger called Trig_Enroll_BI on the ENROLLMENT table that fires before an INSERT statement. The trigger must generate a proper error message if the student id or section id or both invalid. Test your code for all possible options. Make sure that all columns that have NOT NULL values (Use system date for all date fields, user id for all created and modified by fields). Display the inserted record from the ENROLLMENT table after a successful enrollment transaction.

Question

Create a trigger called Trig_Enroll_BI on the ENROLLMENT table that fires before an INSERT statement. The trigger must generate a proper error message if the student id or section id or both invalid. Test your code for all possible options. Make sure that all columns that have NOT NULL values (Use system date for all date fields, user id for all created and modified by fields). Display the inserted record from the ENROLLMENT table after a successful enrollment transaction.

Expert Answer

Want to see the step-by-step answer?

See Answer

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

See Answer
*Response times vary by subject and question complexity. Median response time is 34 minutes and may be longer for new subjects.

Related Computer Science Q&A

Find answers to questions asked by student like you

Q: write a program in c++. You work for a box company, and have been asked to write a program to compar...

A: Solution:The C++ program has the following algorithm:Declare and initialize the required variables.D...

Q: Construct npda that accept the following languages on Σ = {a, b, c}: L = {anb3n : n ≥ 0}.

A: To construct the NPDA of the language L = {anb3n : n ≥ 0} on Σ = {a, b, c}, we will draw a machine l...

Q: 5-27) (Display leap years) Write a program that displays all the leap years, ten per line, from two ...

A: Note: The below program has been complied and executed in NetBeans IDE 8.2

Q: How to write a function in python where it takes a list of string s. Where s= ["hello","lazyness","p...

A: The program has the following algorithm:Intitialize the counter counting string list position number...

Q: Write a method that sums all the numbers in the major diagonal in an n x n matrix of double values u...

A: Note: The below program has been complied and executed in NetBeans IDE 8.2

Q: Help.

A: The given program is defining the function swapints with two integer values. The swapints function i...

Q: Show a derivation tree for the string aabbbb with the grammar S→AB|λ,A→aB,B→Sb.

A: Given:Grammar: S → AB | λ, A → aB, B → SbString: aabbbbLet us take a top-down approach,Starts with t...

Q: Assume the following declarations and initializations (MIN, MAX, num) are made just before each sub-...

A: Answer: Algorithm:The program has the following algorithm:The class name is “Main” and in the main m...

Q: Exhibit an algorithm to determine whether or not a regular language L contains any string w such tha...

A: Solution: Given that,The following algorithm identify whether or not a regular language “L” contains...