FORMATIVE 4 Flashcards

1
Q

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

True or False

A

True

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

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

True or False

A

True

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

The OR REPLACE options (DROP) and re-creates the package specification.

True or False

A

True

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

The package specification can exist without the body, but the body cannot exist without the specification.

True or False

A

True

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

The package specification is the interface to your applications that declares the constructs (procedures, functions, variables, and so on) which are visible to the calling environment.

True or False

A

True

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

The USER_TRIGGERS is used to view the detailed code and status of the trigger in data dictionary.

True or False

A

True

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

Database triggers are created and stored in the database just like PL/SQL procedures, functions, and packages.

True or False

A

True

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

Which statement is used to enable a database trigger?

ALTER TABLE trigger_name enable

UPDATE TRIGGER trigger_name enable

ALTER TRIGGER trigger_name enable

ALTER TABLE TRIGGER trigger_name enable

A

ALTER TRIGGER trigger_name enable

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

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

CREATE ALTER TRIGGER

CREATE ANY TRIGGER

CREATE ALL TRIGGER

CREATE TRIGGER

A

CREATE ANY TRIGGER

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

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

DML

DDL, TCL

DML, TCL

DML, DDL

A

DML, DDL

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

You specify a row trigger using (FOR EACH ROW) clause.

True or False

A

True

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

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 or False

A

True

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

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

True or False

A

True

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

The conditional predicates are: (INSERTING), DELETING, UPDATING.

True or False

A

True

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

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.

True or False

A

False

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

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

True or False

A

False

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

TCL statement is allowed in triggers.

True or False

A

False

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

The ON DATABASE fires the trigger only for your own sessions.

True or False

A

False

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

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

True or False

A

True

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

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

PERFORM

CALL

EXECUTE

DO

A

CALL

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

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

True or False

A

False

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

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

True or False

A

False

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

The ON SCHEMA fires the trigger only for _______ sessions.

All the options

OWN

OWN, OTHER

OTHER

A

OWN

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

Which DDL statements cause a DDL trigger to fire?

ALTER, DROP

CREATE, ALTER, DROP

CREATE, DROP

CREATE, ALTER

A

CREATE, ALTER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
The ____ are fired by non-SQL events in the database. Event Trigger Application Trigger Database Event Trigger Data Event Trigger
Database Event Trigger
26
The _____ fires the trigger only for your own sessions. ON SCHEMA ON DATABASE
ONE SCHEMA
27
Which trigger is applicable in the following scenario: The DBA starts up, or shuts down, the database. DML Trigger Database Trigger Database Event Trigger DDL Trigger
Database Event Trigger
28
Package construct (variable, procedure, function, and so on) that can be seen and executed from (OUTSIDE) the package are considered public. True or False
True
29
Encapsulation refers to a two-part structure in which the detailed (PACKAGE BODY) code is invisible to the calling environment, which can only see the specification. If changes to the code are needed, the body can be edited and recompiled without having to edit or recompile the specification. True or False
True
30
Variables declared in the package specification are initialized to NULL by default. True or False
True
31
The OR REPLACE option overwrite an existing package body. True or False
True
32
Triggers can either be row-level or column level. True or False
False
33
You can use triggers to generate derived column values _____. IMPLICITLY AUTOMATICALLY EXPLICITLY MANUALLY
AUTOMATICALLY
34
The (AFTER) trigger timing executes the trigger body after the triggering DML event on the table. True or False
True
35
The (STATEMENT) trigger is the default type of DML trigger. True or False
True
36
The (BEFORE) trigger timing executes the trigger body before theh triggering DML event on a table. True or False
True
37
A (DML) trigger is a trigger that is automatically fired (executed) whenever an SQL DML statement (INSERT, UPDATE, or DELETE) is executed. True or False
True
38
The row trigger is the default type of DML trigger. True or False
False
39
A DML trigger is a database trigger. True or False
True
40
A MUTATE table is an object that is currently being modified by a DML statement. True or False
False
41
A statement trigger cannot SELECT from a mutating table. True or False
False
42
The ________ are fired by non-SQL events in the database. Database event trigger Data event trigger Application Trigger Event trigger
Database event trigger
43
A row-level trigger must not query or modify a mutating table. True or False
True
44
The ON SCHEMA cannot be used with _____ events.. Before and after Login and logout Shutdown and startup DML and DDL
Shutdown and startup
45
The (OR REPLACE) option drops and re-crates the package specification. True False
True
46
The package body contains the executable code of the (SUBPROGRAMS) which were declared in the package specification. It may also contain its own variable declarations. True False
True
47
A package is considered as a database Object. True False
True
48
Since triggers are never explicitly invoked, they cannot receive parameters. True False
True
49
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. True False
False
50
A user connecting to a schema or database is a _____ event. DATABASE SYSTEM SCHEMA DATA
SYSTEM
51
Which will not cause a trigger to fire? DML operations on a vew Not in the options CREATE AND ALTER statement DML operatinos on a table
DML operations on a view
52
Which will view the detailed code and status of the trigger in data dictionary? All the options USER_OBJECTS USER_TRIGGERS USER_ERRORS
USER_TRIGGERS
53
The following determines when a DML trigger will execute: BEFORE, AFTER, (ROW). True False
True
54
Event determines which DML operation causes the trigger to fire. Values are INSERT, UPDATE [OF column], and SELECT. True False
True
55
The given trigger header below contains no error. CREATE OR REPLACE TRIGGER emp_del_trigg AFTER DELETE ON employees BEGIN END; True False
True
56
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. True False
False
57
Exception section is not allowed in triggers. True False
False
58
In creating trigger you need to consider the timing and event. True False
True
59
A ________ fires the trigger for DDL on all schemas in the database. ON DATABASE ON SCHEMA
ON DATABASE
60
A MUTE table is an object that is currently being modified by a DML statement True False
False
61
A MUTATING table is an object that is currently being modified by a DML statement. True False
True
62
The ______ are fired by non-SQL events in the database. Event trigger Application Trigger Data Event Trigger Database Event Trigger
Database Event Trigger
63
The ______ cannot be used with SHUTDOWN and STARTUP events. ON SCHEMA ON DATABASE
ON SCHEMA
64
What is missing in the given construct in order to remove an entire package? DROP (PACKAGE) PACKAGE_NAME; True False
True
65
Inheritance refers to a two-part structure in which the detailed package body code is invisible to the calling environment, which can only see the. If changes to the code are needed, the body can be edited and recompiled without having to edit or recompile the specification. True False
False
66
Triggers like subprograms may or may not have parameters. True False
False
67
TCL are allowed in triggers. True False
False
68
Trigger executes ________ whenever the associated action occurs. Explicity Implicitly
Implicitly
69
Since triggers are never explicitly invoked, they cannot receive _____. ACTUAL PARAMETER All the options FORMAL PARAMETER PARAMETER
PARAMETER
70
The (TRIGGER) 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 False
True
71
The (STATEMENT) trigger fires only once for each execution of the triggering statment (even if no rows are affected). True False
True
72
TCL statement is allowed in triggers True False
False
73
DML Trigger is classified in two ways: when they execute, how they execute. True False
False
74
DDL Triggers can either be ON DATABASE or ON SCHEMA. True False
True
75
A ______ triggers execute whenever a particular event occurs within an application. APPLICATION DATA DATABASE SYSTEM
APPLICATION
76
DML Trigger is classified in two ways: when they execute, how many times they execute. True False
True
77
DML Triggers can either be ON DATABASE or ON SCHEMA. True False
False
78
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 only for DDL on objects in your own schema. Fires the trigger for DDL on all schemas in the database. The trigger fires whenever any type of object is created in your schema. Operation is not allowed because created object is not specified.
The trigger fires whenever any type of object is created in your schema.
79
You cannot create a ______ trigger that refers to a specific database object. DDL DML
DDL
80
Using the package name after the END keyword is optional. True False
True
81
All constructs delcared in the package specification are automatically private constructs. True False
False
82
DBA shutting down the database is a ______ event. DATABASE DATA SYSTEM APPLICATION
SYSTEM
83
The ____ allow specified actions to be performed automatically within the database, without having to write extra application code. PACKAGE TRIGGER EXCEPTION HANDLER SUBPROGRAM
TRIGGER
84
A row trigger may SELECT from a mutating table. True False
False