Consider the simple relation Employee(ID, salary) storing the employee Ids and salaries, where ID is a key. Consider the following two triggers over…

Consider the simple relation Employee(ID, salary) storing the employee Ids and salaries, where ID is a key. Consider the following two triggers over this relation:create trigger T1after insert on Employeereferencing new as New_Empupdate Employeeset salary = 1.1 * (select max(salary) from Employee)where ID = New_Emp.IDfor each rowcreate trigger T2after insert on Employeereferencing newtable as New_Empupdate Employeeset salary = 1.1 * (select max(salary) from Employee)where ID in (select ID from New_Emp)for each statementAssume that relation Employee has no tuples in it initially. You are to show the simplest example you can think of where using trigger T1 will produce a different final database state than using trigger T2.

Leave a Reply