(Paper) Class XII Informatics Practices: Chapter Wise Papers (TRIGGERS)

Disclaimer: This website is NOT associated with CBSE, for official website of CBSE visit - www.cbse.gov.in

Class XII Informatics Practices Paper (Chapter Wise With Answer)


TRIGGERS

Q. 1 Compare and contrast triggers and procedures.
Ans.
Both, triggers and procedures are named PL/SQL blocks that are stored in the database schema. The differences between trigger and procedures are as follows:

(i)Procedures need to be invoked explicitly whereas triggers are invoked automatically when a triggering event take place.
(ii)Procedures can take place parameters whereas triggers can not.

Q.2 Compare and contrast triggers and constraints.
Ans.
Both, triggers and constraints can be used to maintain database integrity. The differences between the two are as follows:
(i)Triggers affect only those row insertions that take place after the trigger is created whereas a constraints can be made to affect all rows in the table, even if they existed before the constraints was created.
(ii)Triggers can be used to define custom constraints, which might not be possible through inbuilt constraints.
(iii)Apart from enforcing constraints, triggers can also be used for database replication, automatic column value generation etc.

Q.3 When do you create are INSTEAD OF triggers?
Ans.
An INSTEAD OF trigger is one that Oracle fires instead of executing the triggering statement. Thus triggers are created on views rather than tables. Thus when we want to enforce certain functionality on views, we need to create INSTEAD OF triggers.

Download Full Paper Here!