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
Q

The __________ cannot be used with SHUTDOWN and STARTUP events.

A

ON SCHEMA

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

A ________trigger must not query or modify a mutating table.

A

STATEMENT-LEVEL

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

The ______ fires the trigger only for your own sessions.

A

ON SCHEMA

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

The _____ are containers that enable you to group together related PL/SQL subprograms, variables, cursors, and exceptions.

A

PL/SQL PACKAGES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
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
30
Q

What is missing in the given construct in order to remove an entire package?
DROP ________ PACKAGE_NAME;

A

PACKAGE

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

(T OR F) The OR REPLACE option deletes an existing package body.

A

FALSE

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

(T OR F) Variables declared in the package specification are initialized to NULL by default

A

TRUE

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

(T OR F) Triggers can either be row-level or statement-level.

A

TRUE

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

(T OR F) To create triggers in other users’ schemas, you need the CREATE ANY TRIGGER privilege

A

TRUE

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

To create triggers in other user’s schemas, you need to the __________ privilege.

A

CREATE ANY TRIGGER

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

Which will view the detailed code and status of the trigger in data dictionary?

A

USER_TRIGGERS

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

Which statement is used to enable a database trigger?

A

ALTER TRIGGER trigger_name enable

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

A ________ fires once for each row affected by the triggering DML statement, either just BEFORE the row is processed or just AFTER.

A

ROW TRIGGER

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

The following determines when a DML trigger will execute: BEFORE, AFTER, ________.

A

INSTEAD OF

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

(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.

41
Q

(T OR F) Exception section is not allowed in triggers.

42
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.

43
Q

(T OR F) DML Trigger is classified in two ways: when they execute, how they execute.

44
Q

(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.

45
Q

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

46
Q

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

47
Q

(T OR F) A statement trigger cannot SELECT from a mutating table.

48
Q

(T OR F) The ON SCHEMA cannot be used with SHUTDOWN and STARTUP events.

49
Q

Database Event triggers can be created ON DATABASE or ON SCHEMA, except that ON SCHEMA cannot be used with ______

A

SHUTDOWN and STARTUP events.

50
Q

(T OR F) A MUTATING table is an object that is currently being modified by a DML statement.

51
Q

(T OR F) The database event triggers are fired by non-SQL events in the database.

52
Q

(T OR F) Database Event triggers
The DBA starts up, or shuts down, the database

53
Q

The _________ are fired by non-SQL events in the database.

A

Database event trigger

54
Q

A ________ fires the trigger for DDL on all schemas in the database.

A

ON DATABASE

55
Q

The _______ is a statement is used to invoke procedure in a trigger.

56
Q

The ON SCHEMA fires the trigger only for _______ sessions.

57
Q

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

58
Q

Every subprogram declared in the package specification must also be included in the
_____.

A

PACKAGE BODY

59
Q

The ________ declared in the package specification are initialized to null by default.

60
Q

Database triggers execute automatically whenever a data event such as _______ occurs

61
Q

You specify a row trigger using __________clause.

A

FOR EACH ROW

62
Q

The ______ triggers can either be ON DATABASE or ON SCHEMA

63
Q

The package body contains the executable code of the _________ which were declared in the package specification. It may also contain its own variable declarations.

A

SUBPROGRAMS

64
Q

The ____ option drops and re-creates the package specification.

A

OR REPLACE

65
Q

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

66
Q

In creating trigger you need to consider the timing and _______

67
Q

A ________ fires the trigger for DDL on all schemas in the database.

A

ON DATABASE

68
Q

You can use triggers to generate derived column values _________.

A

AUTOMATICALLY

69
Q

Which DDL statements cause a DDL trigger to fire?

A

CREATE, ALTER, DROP

70
Q

Trigger executes ________ whenever the associated action occurs

A

IMPLICITLY

71
Q

Trigger executes ________ whenever the associated action occurs.

A

IMPLICITLY

72
Q

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

73
Q

(T OR F) The trigger body is written similar to anonymous block

74
Q

(T OR F) Trigger executes explicitly whenever the associated action occurs.

75
Q

(T OR F) To create triggers in other user’s schemas, you need the CREATE ANY TRIGGER privilege.

76
Q

(T OR F) A row-level trigger must not query or modify a mutating table

77
Q

(T OR F) The ON SCHEMA cannot be used with SHUTDOWN and STARTUP events.

78
Q

(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.

79
Q

(T OR F) The Database Event Trigger are fired by non-SQL events in the database.

80
Q

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

81
Q

(T OR F) Package specification is a container that enable you to group together related PL/SQL subprograms, variables, cursors, and exceptions.

82
Q

(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.

83
Q

(T OR F) DML Trigger is classified in two ways: when they execute, how they execute.

84
Q

(T OR F) A MUTATE table is an object that is currently being modified by a DML statement.

85
Q

(T OR F) A MUTATE table is an object that is currently being modified by a DML statement.

86
Q

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

87
Q

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

88
Q

(T OR F) Using the package name after the END keyword is mandatory.

89
Q

(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.

90
Q

(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.

91
Q

(T OR F) You need to recompile the package specification whenever the body of the subprograms that are in the package body changes.

92
Q

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

93
Q

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

94
Q

(T OR F) The row trigger is the default type of DML trigger.

95
Q

Which trigger is applicable in the following scenario:
The DBA starts up, or shuts down, the database.

A

DATABASE EVENT TRIGGER

96
Q

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;

A

VDATE, SYSDATE

97
Q

The code below will:
CREATE OR REPLACE TRIGGER log_create_trigg
AFTER CREATE ON SCHEMA
BEGIN
INSERT INTO log_table VALUES (USER, SYSDATE);
END;

A

Fires the trigger for DDL on all schemas in the database.