View the step-by-step solution to:

Here is a SQL standard trigger on relation R(a,b): CREATE TRIGGER T AFTER INSERT ON R REFERENCING NEW ROW AS Newtuple FOR EACH ROW WHEN(Newtuple.a *...

  Here is a SQL standard trigger on relation R(a,b):
CREATE TRIGGER T
AFTER INSERT ON R
REFERENCING NEW ROW AS Newtuple
FOR EACH ROW
WHEN(Newtuple.a * Newtuple.b > 10)
INSERT INTO R VALUES(Newtuple.a - 1, Newtuple.b + 1);
        

When we insert a tuple into R, the trigger may cause another tuple to be inserted, which may cause yet another tuple to be inserted, and so on, until finally a tuple is inserted that does not cause the trigger to fire. Your problem is to examine the behavior of this trigger and determine under what circumstances exactly three tuples are inserted. Demonstrate your understanding by identifying, from the list below, which of the following tuples, if inserted into an initially empty relation R, results, after all instances of the trigger are allowed to execute, in exactly three tuples being present in R(a,b)?

 
   a)  (2,50)    b)  (3,4)    c)  (2,6)    d) 

(11,1)

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question