IT 314 DATABASE TRIGGERS
All of the following would cause a trigger to fire, except ____.
BEFORE
Which of the following statements is correct?
A BEFORE statement level trigger will fire before a BEFORE row level trigger.
The statement ____ recompiles the trigger named sales_trg.
ALTER TRIGGER sales_trg COMPILE;
___________________________ are clauses available within a trigger to allow separate handling of different database triggering events within a single trigger.
Conditional predicates
DDL events include all of the following, except ____.
DECLARE
The statement ____ correctly deletes a trigger.
DROP TRIGGER trigger_name;
A constraining table is one that is being modified by a DML action when a trigger is fired.
FALSE
A(n) mutating table is one that is referenced via a foreign key constraint on the table that a trigger is modifying.
FALSE
System triggers are typically used to allow the modification of data through a view on a view that is nonmodifiable.
FALSE
The default timing of a trigger is row level and no code is included to achieve this timing.
FALSE
The timing of triggers must be indicated as either BEGIN or END.
FALSE
LOB and OBJECT columns can be referenced in a trigger and can also be modified.
False
Database system events include all of the following, except ____.
GRANT
A(n) ___________________________ is a PL/SQL block that executes in place of a DML action on a database view.
Instead-Of trigger
In the syntax of the CREATE TRIGGER statement, the ____________________ clause can be used to change the OLD and NEW qualifier names to something of your choice.
REFERENCING
The ___________________________ level option is applicable only for UPDATE and DELETE events.
ROW
Which of the following indicates that the trigger is fired only once, regardless of the number of rows affected by the DML statement?
Statement level
____ triggers refer to database triggers that are fired by Data Definition Language (DDL) statements or database system events rather than DML actions.
System
A database trigger is tied to a database table or view and is implicitly fired by the database system when that table or view is affected with the associated DML action.
TRUE
LONG RAW variables cannot be declared in triggers.
TRUE
One prominent limitation in the use of triggers is that they cannot issue transaction control statements of COMMIT, ROLLBACK, and SAVEPOINT.
TRUE
The ALTER TRIGGER statement is used to recompile, enable, or disable a trigger.
TRUE
The WHEN clause of a trigger can be used only in row level triggers.
TRUE
The trigger body is a PL/SQL block that contains the actions that take place when the trigger fires.
TRUE
Which of the following statements is true?
The body of a trigger cannot read or modify the primary, unique, or foreign key columns of a constraining table.
Which of the following events will cause the trigger to fire? AFTER UPDATE OF orderplaced ON bb_basket
UPDATE
Row level options are only applicable for ____ events.
UPDATE and DELETE
The values checked in the ___________________________ clause of a trigger must reference correlation identifiers.
WHEN
A(n) ___________________________ is one that is referenced via a foreign key constraint on the table that a trigger is modifying.
constraining table
A(n) ____ trigger fires whenever the event occurs, regardless of the schema in which it occurs.
database level
A(n) ____ table is one that is involved in a join and the keys of the original table are included in the keys of the resultant join.
key-preserved
To rebuild a database, if you are using the iSQL*Plus tool (Internet interface), first click the ____________________ button.
load script
CREATE OR REPLACE TRIGGER logon_trg AFTER logon ON SCHEMA BEGIN INSERT INTO bb_audit_logon VALUES (USER, SYSDATE); END; In the code fragment above, which of the ____ statement represents the system event.
logon
A(n) ____ is a table that is being modified by a DML action when a trigger is fired.
mutating table
To rebuild a database, if you are using the SQL*Plus client tool, create a(n) ____________________ to keep a copy of all the messages received from running the file that created the database.
spool file
The default timing of a trigger is ___________________________ level and no code is included to achieve this timing.
statement
The default timing of a trigger is ____.
statement level
CREATE [OR REPLACE] TRIGGER trigger_name [BEFORE, AFTER][ List of DDL or Database System Events] [ON DATABASE |SCHEMA] Trigger body; The syntax above represents that of a(n) ____ trigger.
system
A database ___________________________ is a block of PL/SQL code that runs automatically when a particular database event occurs.
trigger