DATABASE Final Exam Reviewer[TRUE OR FALSE]

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/213

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

214 Terms

1
New cards

LETSS GO!!😊

YOU CAN DO IT!!😊

2
New cards

Is there something missing in the given code?

DECLARE

v_myage NUMBER := 31;

BEGIN

IF v_myage < 11

DBMS_OUTPUT.PUT_LINE('I am a child');

END IF;

END;

Group of answer choices

True

False

True

3
New cards

dl link for m1s2 reference: https://feu.instructure.com/courses/98146/files/25247880/download?wrap=1

Refer to M1S2-code reference#3, is the symbol used for the assignment operator correct?

Group of answer choices

True

False

True

4
New cards

A condition is an expression that returns true, false, or null.

Group of answer choices

True

False

True

5
New cards

dl link for m1s2 reference: https://feu.instructure.com/courses/98146/files/25247880/download?wrap=1

Refer to M1S2-code reference#3, data type for vmesg variable must be CHAR.

Group of answer choices

True

False

False

6
New cards

A counter variable is an expression that returns true, false, or null.

Group of answer choices

True

False

False

7
New cards

dl link for m1s2 reference: https://feu.instructure.com/courses/98146/files/25247880/download?wrap=1

Refer to M1S2-code reference#2, the missing condition in (2) is vpop = 0.

Group of answer choices

True

False

True

8
New cards

In BASIC and WHILE loop, the iteration will terminate when the counter is < than the upper bound.

Group of answer choices

True

False

False

9
New cards

dl link for m1s2 reference: https://feu.instructure.com/courses/98146/files/25247880/download?wrap=1

Refer to M1S2-code reference#3, the table name AIRPORT is missing in the creation of the implicit cursor.

Group of answer choices

True

False

False

10
New cards

dl link for m1s2 reference: https://feu.instructure.com/courses/98146/files/25247880/download?wrap=1

Refer to M1S2-code reference#3, the missing in the last case selection is v_aport > 10000.

Group of answer choices

True

False

True

11
New cards

dl link for m1s2 reference: https://feu.instructure.com/courses/98146/files/25247880/download?wrap=1

Refer to M1S2-code reference#2, the missing part of the condition in (1) is FALSE.

Group of answer choices

True

False

False

12
New cards

Consider the given code fragment below. The condition will return a true value.

A:=null; B:=null;

If A = B then . . . . .

Group of answer choices

True

False

False

13
New cards

Control structures are used to change the logical flow of statements within the PL/SQL block.

Group of answer choices

True

False

True

14
New cards

All counter variables must be declared at the declaration section.

Group of answer choices

True

False

False

15
New cards

Without the EXIT statement, the loop would never end (an infinite loop).

Group of answer choices

True

False

True

16
New cards

Use a DO..WHILE loop when the statement inside the loop must execute at least once.

Group of answer choices

True

False

False

17
New cards

In BASIC and WHILE loop, the iteration will terminate when the counter is > than the upper bound.

Group of answer choices

True

False

False

18
New cards

In for loop, counter must be explicitly declared.

Group of answer choices

True

False

False

19
New cards

The BASIC LOOP control structures are statements that enable you to execute statements in a PL/SQL block repeatedly.

Group of answer choices

True

False

True

20
New cards

Applying the logical operator NOT to a null yields FALSE.

Group of answer choices

True

False

False

21
New cards

Applying the logical operator NOT to a null yields NULL.

Group of answer choices

True

False

True

22
New cards

The use of CASE statement to test conditions such as <, >, >=, <= is know as case expression.

Group of answer choices

True

False

False, its Searched CASE statement

23
New cards

Consider the given code fragment below. The condition will return a false value.

A:=null; B:=null;

If A = B then . . . . .

Group of answer choices

True

False

True

24
New cards

dl link for m1s3 reference:https://feu.instructure.com/courses/98146/files/25247978/download?wrap=1

Refer to M1S3-code reference#1, the loop body will be performed 5 times.

Group of answer choices

True

False

True

25
New cards

dl link for m1s3 reference:https://feu.instructure.com/courses/98146/files/25247978/download?wrap=1

Refer to M1S3-code reference#2, the VLOC_ID is missing in the SELECT statement?

Group of answer choices

True

False

True

26
New cards

In BASIC and WHILE loop, initialization of counter variable is necessary.

Group of answer choices

True

False

True

27
New cards

In BASIC and WHILE loop, the iteration will terminate when the counter value meets the upper bound value.

Group of answer choices

True

False

False

28
New cards

The lower and upper bound of a for loop must be a numeric literals.

Group of answer choices

True

False

False

29
New cards

dl link for m1s3 reference:https://feu.instructure.com/courses/98146/files/25247978/download?wrap=1

Refer to M1S3-code reference #1, the '>' is the missing operator in the EXIT section.

Group of answer choices

True

False

True. I guess it referring to reference #1

30
New cards

An EXIT statement is used in order to come out of from the outer loop within an inner loop.

Group of answer choices

True

False

False

31
New cards

Always add exception handlers whenever there is a possibility of an error occurring.

Group of answer choices

True

False

True

32
New cards

Use the %ISOPEN cursor attribute before performing a fetch to test whether the cursor is open.

Group of answer choices

True

False

True

33
New cards

The RAISE keyword is used in user-defined exception for error notification.

Group of answer choices

True

False

True

34
New cards

Type and record declared in the outer block are visible only in the outer block.

Group of answer choices

True

False

False

35
New cards

The user-defined exceptions are declared within the declarative section and are raised implicitly.

Group of answer choices

True

False

False

36
New cards

You must include the FOR UPDATE clause in the cursor query so that the rows are unlocked on OPEN.

Group of answer choices

True

False

False

37
New cards

Exception handlers are code that defines the recovery actions to be performed when execution-time errors occur.

Group of answer choices

True

False

True

38
New cards

Exception section is mandatory in PL/SQL block.

Group of answer choices

True

False

False

39
New cards

In exception section, the WHEN clause if followed by a condition.

Group of answer choices

True

False

False

40
New cards

Each exception handler is consists of a WHEN clause, which specifies an exception name.

Group of answer choices

True

False

True

41
New cards

The term RAISE in exceptions is the same as handling any error by including corresponding exception handler.

Group of answer choices

True

False

False

42
New cards

In explicit cursor, you need to fetch each row one at a time.

Group of answer choices

True

False

True

43
New cards

Given the code below:

1. DECLARE

2. CURSOR cur_emps

3. SELECT employee_id, last_name FROM employees;

4. BEGIN

5. FOR cur_emps IN v_emp_record LOOP

6. EXIT WHEN cur_emps%ROWCOUNT > 5;

7. DBMS_OUTPUT.PUT_LINE(v_emp_record.employee_id || ' ' || v_emp_record.last_name);

8. END LOOP;

9. END;

What is missing in line 2 and 3?

Group of answer choices

INTO

RECORD

IS

Nothing is missing

44
New cards

TYPE and Records are composite structures.

Group of answer choices

True

False

True

45
New cards

The FETCH statement positions the cursor pointer at the first row.

Group of answer choices

True

False

False

46
New cards

The OPEN will populate the cursor's active set with the result of the SELECT statement in the cursor's definition?

Group of answer choices

True

False

True

47
New cards

The OTHERS is mandatory exception-handling clause that traps any exceptions that have not been explicitly handled.

Group of answer choices

True

False

False

48
New cards

The given syntax in declaring a user-define record is correct.

TYPE type_name IS RECORD

(field_declaration[,field_declaration]...);

identifier type_name ;

Group of answer choices

True

False

True

49
New cards

The FETCH will populate the cursor's active set with the result of the SELECT statement in the cursor's definition?

Group of answer choices

True

False

True

50
New cards

Use the ISOPEN cursor attribute before performing a fetch to test whether the cursor is open.

Group of answer choices

True

False

False

51
New cards

The following statements are examples of exception handler.

Entering an expiration date that has passed

Selecting more than one row into a single variablE

Receiving "no rows returned" from a select statement

Group of answer choices

True

False

False

52
New cards

The term TRAP in exceptions is the same as handling any error by including corresponding exception handler.

Group of answer choices

True

False

True

53
New cards

The following statements are examples of exception.

Entering an expiration date that has passed

Selecting more than one row into a single variable

Receiving "no rows returned" from a select statement

Group of answer choices

True

False

True

54
New cards

The OTHERS is an optional exception-handling clause that traps any exceptions that have not been explicitly handled.

Group of answer choices

True

False

True

55
New cards

In explicit cursor operations, the set of rows returned by a multiple-row query is called RECORD SET.

Group of answer choices

True

False

False

56
New cards

You can use the EXCEPTION_INIT procedure to return user-defined error messages from stored subprograms.

Group of answer choices

True

False

False

57
New cards

An exception occurs when an error is discovered during the execution of a program that disrupts the normal operation of the program.

Group of answer choices

True

False

True

58
New cards

The NOWAIT keyword is optional in the FOR UPDATE clause.

Group of answer choices

True

False

True

59
New cards

Non-predefined errors are raised explicitly.

Group of answer choices

True

False

False

60
New cards

The given syntax in declaring a user-define record is incorrect.

TYPE type_name IS RECORD

(field_declaration[,field_declaration]...);

identifier type_name ;

Group of answer choices

True

False

False

61
New cards

The RAISE_APPLICATION_ERROR can be used in executable and exception section.

Group of answer choices

True

False

True

62
New cards

There are 2 parameters needed in the pragma declaration of an exception.

Group of answer choices

True

False

True

63
New cards

Pragma declaration is used in declaring non-predefined exceptions.

Group of answer choices

True

False

True

64
New cards

The PRAGMA clause is used in predefined exception to tell the compiler to associate an exception name with a specific Oracle error number.

Group of answer choices

True

False

False

65
New cards

Names for predefined exceptions must be declared in the declaration section.

Group of answer choices

True

False

False

66
New cards

Given the code below, EMPLOYEES table must be specified at the DBMS_OUTPUT section.

DECLARE

v_emp_record employees2%rowtype;

BEGIN

SELECT * INTO v_emp_record FROM employees2 WHERE employee_id = 100;

DBMS_OUTPUT.PUT_LINE('Email for ' || _____________.first_name || ' ' || ____________.last_name);

END;

Group of answer choices

True

False

False

67
New cards

The NOWAIT keyword is mandatory in the FOR UPDATE clause.

Group of answer choices

True

False

False

68
New cards

The %ROWTYPE cannot be used to declare a record based on another record.

Group of answer choices

True

False

False

69
New cards

The ( ) symbol is used to enclose the elements of the TYPE structure.

Group of answer choices

True

False

True

70
New cards

When we declare a cursor FOR UPDATE, each row is locked as we open the cursor but does not prevent other users from reading the rows.

Group of answer choices

True

False

True

71
New cards

The RAISE statement can be used to raise either user-defined or predefined exception.

Group of answer choices

True

False

False

72
New cards

The %ROWTYPE can be used to declare a record based on another record.

Group of answer choices

True

False

True

73
New cards

Given the code below, EMPLOYEES%ROWTYPE is missing in the declaration section to declare v_emp_record as type record of EMPLOYEES table.

DECLARE

v_emp_record _______________;

Group of answer choices

True

False

True

74
New cards

PL/SQL records contain one or more components/fields of any scalar or composite type.

Group of answer choices

True

False

True

75
New cards

The SQLCODE function returns the numeric value for the error code.

Group of answer choices

True

False

True

76
New cards

When code does not work as expected, PL/SQL raises an exception handler.

Group of answer choices

True

False

False

77
New cards

When an exception is raised, control immediately shifts to the exception section and the appropriate handler in the exception section is executed.

Group of answer choices

True

False

True

78
New cards

When an exception is raised, the rest of the execution section of the PL/SQL block is not executed.

Group of answer choices

True

False

True

79
New cards

The RAISE keyword is used by non-predefined exception.

Group of answer choices

True

False

False

80
New cards

The EXECUTE keyword is used in user-defined exception for error notification.

Group of answer choices

True

False

False

81
New cards

The RAISE statement can be used to raise either user-defined or non-predefined exception.

Group of answer choices

True

False

True

82
New cards

You can use the RAISE_APPLICATION_ERROR procedure to return user-defined error messages from stored subprograms.

Group of answer choices

True

False

True

83
New cards

Pragma declaration is used in declaring user-defined exceptions.

Group of answer choices

True

False

False

84
New cards

User-defined exceptions are declared within the declarative section and are raised explicitly.

Group of answer choices

True

False

True

85
New cards

Non-predefined exceptions has a standard Oracle error number (ORA-#####) and error message, but not a predefined name.

Group of answer choices

True

False

True

86
New cards

The following declaration is a PL/SQL syntax for defining a record.

Record_name table_name%rowtype;

Group of answer choices

True

False

True

87
New cards

The type and the record declared in the outer block are visible within the outer block and the inner block.

Group of answer choices

True

False

True

88
New cards

PL/SQL record is a composite data type, you can refer to the whole record by its name and/or to individual fields by their names.

Group of answer choices

True

False

True

89
New cards

You must include the FOR UPDATE clause in the cursor query so that the rows are locked on OPEN.

Group of answer choices

True

False

True

90
New cards

In Procedure, the default parameter mode is IN.

Group of answer choices

True

False

True

91
New cards

To invoke a procedure from another procedure, use a direct call inside an executable section of the block.

Group of answer choices

True

False

True

92
New cards

Procedures may have an exception section.

Group of answer choices

True

False

True

93
New cards

The OUT parameter mode supplies an input value, which can be returned (output) as a modified value.

Group of answer choices

True

False

False

94
New cards

The DEFAULT keyword is used to assign a default value for formal parameters.

Group of answer choices

True

False

False

95
New cards

A procedure is a PL/SQL block containing local variables, a BEGIN, and an END. The procedure_name after the END keyword is optional.

Group of answer choices

True

False

True

96
New cards

A procedure is a PL/SQL block containing local variables, a BEGIN, and an END. The procedure_name after the END keyword is mandatory.

Group of answer choices

True

False

False

97
New cards

A procedure is compiled and stored in the database as a schema object.

Group of answer choices

True

False

True

98
New cards

The symbol >> is used for association operator?

Group of answer choices

True

False

False

99
New cards

You can invoke a procedure from inside an SQL statement.

Group of answer choices

True

False

False

100
New cards

The Positional parameter passing is the common method of passing parameters.

Group of answer choices

True

False

True