- 7 Here Is A Sql Standard Trigger On Relation R A B Create Trigger T After Insert On R Referencing New Row As Newtuple 1 (56.69 KiB) Viewed 22 times
7. Here is a SQL standard trigger on relation R(a,b): CREATE TRIGGER T AFTER INSERT ON R REFERENCING NEW ROW AS Newtuple
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
7. Here is a SQL standard trigger on relation R(a,b): CREATE TRIGGER T AFTER INSERT ON R REFERENCING NEW ROW AS Newtuple
7. 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)? O a) (4,3) Ob) (3,9) O c) (50,0) O d) (3,4)