True anything is available online.
Answer:
The trigger code is given below
create trigger F1_Del
after delete on Friend
for each row
when exists (select * from Friend
where ID1 = Old.ID2 and ID2 = Old.ID1)
begin
delete from Friend
where (ID1 = Old.ID2 and ID2 = Old.ID1);
end
create trigger F1_Insert
after insert on Friend
for each row
when not exists (select * from Friend
where ID1 = New.ID2 and ID2 = New.ID1)
begin
insert into Friend values (New.ID2, New.ID1);
end
Answer:
STP mainly uses 5 states in a network, in which some states are replaced in RSTP which improves the time efficiency.
Explanation:
STP mainly uses five states i.e. Learning, Listening, Blocking, Disabling and Forwarding to overcome the problem of collision in a network.
RSTP replaced the three states of STP i.e listening, learning, and blocking by Discarding, which results in the time efficiency as compared to STP.
As STP takes minutes to complete the network inter connectivity, RSTP completes it in seconds.
This is one of the main reason why an administrator want to change to RSTP.