FA 4 Flashcards

1
Q

The package specification should contain the subprogram ________ and associated parameters terminated by a semicolon.

A

NAME

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The OR REPLACE options _______ and re-creates the package specification.

A

DROPS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The implementation (i.e., the detailed code) of a procedure or function that is declared in a ________ is done in the package body.

A

PACKAGE SPECIFICATION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

(T OR F) A package is considered as a database Object.

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

(T OR F) All constructs declared in the package specification are automatically private constructs.

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

(T OR F) Since triggers are never explicitly invoked, they cannot receive parameters.
To create triggers in other user’s schemas, you need the CREATE TRIGGER privilege.

A

FALSE (CREATE ANY TRIGGER)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

A _____ trigger execute automatically whenever a data event or a system event occurs.

A

DATABASE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The_________ allow specified actions to be performed automatically within the database, without having to write extra application code.

A

TRIGGER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The ____ trigger timing executes the trigger body after the triggering DML event on a table.

A

AFTER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The conditional predicates are: _______, DELETING, UPDATING.

A

INSERTING

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The ________trigger is the default type of DML trigger.

A

STATEMENT TRIGGER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Event determines which DML operation causes the trigger to fire. Values are DELETE, UPDATE [OF column], and ______.

A

INSERT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The ________ keywords are automatically declared Boolean variables which are set to TRUE or FALSE by the Oracle server. These keywords maybe used in the trigger body instead of UPDATE, INSERT, DELETE.

A

TRIGGER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

(T OR F) A statement-level trigger fires once for each row affected by the triggering DML statement, either just BEFORE the row is processed or just AFTER.

A

FALSE (ROW TRIGGER)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

(T OR F) A DML trigger is a database trigger.

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

(T OR F) A DML trigger may have more than one triggering event.

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

(T OR F) TCL statement is allowed in triggers.

A

FALSE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

(T OR F) The following determines when a DML trigger will execute: BEFORE, AFTER, INSTEAD.

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

(T OR F) DDL Triggers can either be ON DATABASE or ON SCHEMA

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

(T OR F) The EXECUTE is a statement is used to invoke procedure in a trigger.

A

FALSE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

(T OR F) The use INSTEAD OF with Database Event triggers is possible.

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

(T OR F) A ON SCHEMA fires the trigger for DDL on all schemas in the database.

A

FALSE (ON DATABASE)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

(T OR F) You cannot create a DDL trigger that refers to a specific database object.

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

The ______ triggers can either be ON DATABASE or ON SCHEMA.

A

DML

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
The __________ cannot be used with SHUTDOWN and STARTUP events.
ON SCHEMA
26
A ________trigger must not query or modify a mutating table.
STATEMENT-LEVEL
27
The ______ fires the trigger only for your own sessions.
ON SCHEMA
28
The _____ are containers that enable you to group together related PL/SQL subprograms, variables, cursors, and exceptions.
PL/SQL PACKAGES
29
The implementation (i.e., the detailed code) of a procedure or function that is declared in a ________ is done in the package body.
PACKAGE SPECIFICATION
30
What is missing in the given construct in order to remove an entire package? DROP ________ PACKAGE_NAME;
PACKAGE
31
(T OR F) The OR REPLACE option deletes an existing package body.
FALSE
32
(T OR F) Variables declared in the package specification are initialized to NULL by default
TRUE
33
(T OR F) Triggers can either be row-level or statement-level.
TRUE
34
(T OR F) To create triggers in other users' schemas, you need the CREATE ANY TRIGGER privilege
TRUE
35
To create triggers in other user’s schemas, you need to the __________ privilege.
CREATE ANY TRIGGER
36
Which will view the detailed code and status of the trigger in data dictionary?
USER_TRIGGERS
37
Which statement is used to enable a database trigger?
ALTER TRIGGER trigger_name enable
38
A ________ fires once for each row affected by the triggering DML statement, either just BEFORE the row is processed or just AFTER.
ROW TRIGGER
39
The following determines when a DML trigger will execute: BEFORE, AFTER, ________.
INSTEAD OF
40
(T OR F) The Conditional Predicates keywords are automatically declared Boolean variables which are set to TRUE or FALSE by the Oracle server. These keywords maybe used in the trigger body instead of UPDATE, INSERT, DELETE.
TRUE
41
(T OR F) Exception section is not allowed in triggers.
FALSE
42
(T OR F) A statement-level trigger fires once for each row affected by the triggering DML statement, either just BEFORE the row is processed or just AFTER.
FALSE
43
(T OR F) DML Trigger is classified in two ways: when they execute, how they execute.
TRUE
44
(T OR F) The PREDICATE keywords are automatically declared Boolean variables which are set to TRUE or FALSE by the Oracle server. These keywords maybe used in the trigger body instead of UPDATE, INSERT, DELETE.
FALSE
45
(T OR F) DML Triggers can either be ON DATABASE or ON SCHEMA.
FALSE
46
The ______ triggers can either be ON DATABASE or ON SCHEMA.E
DDL
47
(T OR F) A statement trigger cannot SELECT from a mutating table.
FALSE
48
(T OR F) The ON SCHEMA cannot be used with SHUTDOWN and STARTUP events.
TRUE
49
Database Event triggers can be created ON DATABASE or ON SCHEMA, except that ON SCHEMA cannot be used with ______
SHUTDOWN and STARTUP events.
50
(T OR F) A MUTATING table is an object that is currently being modified by a DML statement.
FALSE
51
(T OR F) The database event triggers are fired by non-SQL events in the database.
TRUE
52
(T OR F) Database Event triggers The DBA starts up, or shuts down, the database
TRUE
53
The _________ are fired by non-SQL events in the database.
Database event trigger
54
A ________ fires the trigger for DDL on all schemas in the database.
ON DATABASE
55
The _______ is a statement is used to invoke procedure in a trigger.
CALL
56
The ON SCHEMA fires the trigger only for _______ sessions.
OWN
57
The package specification should contain the subprogram ________ and associated parameters terminated by a semicolon
NAME
58
Every subprogram declared in the package specification must also be included in the _____.
PACKAGE BODY
59
The ________ declared in the package specification are initialized to null by default.
VARIABLES
60
Database triggers execute automatically whenever a data event such as _______ occurs
DML, DDL
61
You specify a row trigger using __________clause.
FOR EACH ROW
62
The ______ triggers can either be ON DATABASE or ON SCHEMA
DDL
63
The package body contains the executable code of the _________ which were declared in the package specification. It may also contain its own variable declarations.
SUBPROGRAMS
64
The ____ option drops and re-creates the package specification.
OR REPLACE
65
The ____ trigger timing executes the trigger body before the triggering DML event on a table.
BEFORE
66
In creating trigger you need to consider the timing and _______
EVENT
67
A ________ fires the trigger for DDL on all schemas in the database.
ON DATABASE
68
You can use triggers to generate derived column values _________.
AUTOMATICALLY
69
Which DDL statements cause a DDL trigger to fire?
CREATE, ALTER, DROP
70
Trigger executes ________ whenever the associated action occurs
IMPLICITLY
71
Trigger executes ________ whenever the associated action occurs.
IMPLICITLY
72
(T OR F) A DML trigger is a database trigger.
TRUE
73
(T OR F) The trigger body is written similar to anonymous block
TRUE
74
(T OR F) Trigger executes explicitly whenever the associated action occurs.
TRUE
75
(T OR F) To create triggers in other user’s schemas, you need the CREATE ANY TRIGGER privilege.
TRUE
76
(T OR F) A row-level trigger must not query or modify a mutating table
TRUE
77
(T OR F) The ON SCHEMA cannot be used with SHUTDOWN and STARTUP events.
TRUE
78
(T OR F) A row trigger fires once for each row affected by the triggering DML statement, either just BEFORE the row is processed or just AFTER.
TRUE
79
(T OR F) The Database Event Trigger are fired by non-SQL events in the database.
TRUE
80
(T OR F) You cannot create a DDL trigger that refers to a specific database object
TRUE
81
(T OR F) Package specification is a container that enable you to group together related PL/SQL subprograms, variables, cursors, and exceptions.
TRUE
82
(T OR F) The PREDICATE keywords are automatically declared Boolean variables which are set to TRUE or FALSE by the Oracle server. These keywords maybe used in the trigger body instead of UPDATE, INSERT, DELETE.
FALSE
83
(T OR F) DML Trigger is classified in two ways: when they execute, how they execute.
FALSE
84
(T OR F) A MUTATE table is an object that is currently being modified by a DML statement.
FALSE
85
(T OR F) A MUTATE table is an object that is currently being modified by a DML statement.
FALSE
86
(T OR F) The use INSTEAD OF with Database Event triggers is possible.
FALSE
87
(T OR F) The CALL is a statement is used to invoke procedure in a trigger.
FALSE
88
(T OR F) Using the package name after the END keyword is mandatory.
FALSE
89
(T OR F) The Conditional Predicates keywords are automatically declared Boolean variables which are set to TRUE or FALSE by the Oracle server. These keywords maybe used in the trigger body instead of UPDATE, INSERT, DELETE.
FALSE
90
(T OR F) One of the differences between triggers and stored procedure is that, TCL statements are allowed in triggers which are not allowed in the stored procedures.
FALSE
91
(T OR F) You need to recompile the package specification whenever the body of the subprograms that are in the package body changes.
FALSE
92
(T OR F) All constructs declared in the package specification are automatically private constructs.
FALSE
93
(T OR F) TCL statement is allowed in triggers.
FALSE
94
(T OR F) The row trigger is the default type of DML trigger.
FALSE
95
Which trigger is applicable in the following scenario: The DBA starts up, or shuts down, the database.
DATABASE EVENT TRIGGER
96
What will cause an error in the given trigger declaration? CREATE OR REPLACE TRIGGER log_salchange_trigg AFTER UPDATE OF salary ON employees IS DECLARE VDATE NUMBER := SYSDATE; BEGIN INSERT INTO log_table (user_id, logon_date) VALUES (USER, VDATE); END;
VDATE, SYSDATE
97
The code below will: CREATE OR REPLACE TRIGGER log_create_trigg AFTER CREATE ON SCHEMA BEGIN INSERT INTO log_table VALUES (USER, SYSDATE); END;
Fires the trigger for DDL on all schemas in the database.
98