0% found this document useful (0 votes)
804 views

Database Programming With PL - SQL 2019 Learner - English-Merged

The document is a quiz feedback from a PL/SQL database programming course. It provides the answers to 15 multiple choice questions about PL/SQL data structures like records, cursors, and index-by tables. For each question, it indicates whether the user's answer was correct or not and provides the feedback.

Uploaded by

Muhammad Akbar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
804 views

Database Programming With PL - SQL 2019 Learner - English-Merged

The document is a quiz feedback from a PL/SQL database programming course. It provides the answers to 15 multiple choice questions about PL/SQL data structures like records, cursors, and index-by tables. For each question, it indicates whether the user's answer was correct or not and provides the feedback.

Uploaded by

Muhammad Akbar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

14/12/2019 Database Programming with PL/SQL 2019 Learner - English

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 6 Quiz
(Answer all questions in this section)
1. Which of these PL/SQL data structures could store a complete copy of the employees table, i.e., 20 Mark for Review
complete table rows? (1) Points
An explicit cursor based on SELECT * FROM employees;
An INDEX BY table
An INDEX BY table of records (*)
A record

Incorrect. Refer to Section 6 Lesson 2.

2. An INDEX BY TABLE primary key cannot be negative. Mark for Review


(1) Points
True
False (*)

Correct

3. In an INDEX BY table of records the record can be _______________________. Mark for Review
(1) Points
a user-defined record
%ROWTYPE
Either one. (*)

Incorrect. Refer to Section 6 Lesson 2.

4. Which of the following methods can be used to reference elements of an INDEX BY table? (Choose Mark for Review
three.) (1) Points
(Choose all correct answers)
COUNT (*)
DROP
PREVIOUS
FIRST (*)
EXISTS (*)

Incorrect. Refer to Section 6 Lesson 2.

5. Which of these PL/SQL data structures can NOT store a collection? Mark for Review
(1) Points
An INDEX BY table of records
An INDEX BY table indexed by BINARY_INTEGER
A PL/SQL record (*)
An INDEX BY table indexed by PLS_INTEGER

Incorrect. Refer to Section 6 Lesson 2.

ilearning.oracle.com/ilearn/en/learner/jsp/player.jsp?rco_id=2360210928&classroom_id=2374736877&scorm_attempt=1576282798762&sessionI… 1/1
14/12/2019 Database Programming with PL/SQL 2019 Learner - English

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 6 Quiz
(Answer all questions in this section)
6. An INDEX BY TABLE must have a primary key. Mark for Review
(1) Points
True (*)
False

Correct

7. Which of the following successfully declares an INDEX BY table of records which could be used to Mark for Review
store copies of complete rows from the departments table? (1) Points
DECLARE
TYPE t_depttab IS TABLE OF departments%ROWTYPE
INDEXED BY NUMBER;

DECLARE
TYPE t_depttab IS INDEX BY TABLE OF departments%ROWTYPE
INDEX BY BINARY_INTEGER;

DECLARE
TYPE t_depttab IS TABLE OF departments%TYPE
INDEX BY BINARY_INTEGER;

DECLARE
TYPE t_depttab IS TABLE OF departments%ROWTYPE
INDEX BY BINARY_INTEGER;

(*)
Incorrect. Refer to Section 6 Lesson 2.

8. To declare an INDEX BY table, we must first declare a type and then declare a collection variable of Mark for Review
that type. True or False? (1) Points
True (*)
False

Incorrect. Refer to Section 6 Lesson 2.

9. An INDEX BY TABLE type can only have one data field. Mark for Review
(1) Points
True (*)
False

Correct

10. What is the largest number of elements (i.e., records) that an INDEX BY table of records can Mark for Review
contain? (1) Points
Many millions of records because a BINARY_INTEGER or PLS_INTEGER can have a very large
value (*)
100
4096
32767
None of these.

ilearning.oracle.com/ilearn/en/learner/jsp/player.jsp?rco_id=2360210928&classroom_id=2374736877&scorm_attempt=1576282798762&sessionI… 1/1
14/12/2019 Database Programming with PL/SQL 2019 Learner - English

Test: Section 6 Quiz


Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 6 Quiz
(Answer all questions in this section)
11. The following code declares a PL/SQL record with the same structure as a row of the departments Mark for Review
table. True or False? (1) Points
DECLARE
v_dept_rec departments%ROWTYPE;
...
True (*)
False

Correct

12. Consider the following code: Mark for Review


(1) Points
DECLARE
TYPE dept_info_type IS RECORD
(department_id departments.department_id%TYPE,
department_name departments.department_name%TYPE);
TYPE emp_dept_type IS RECORD
(first_name employees.first_name%TYPE,
last_name employees.last_name%TYPE),
dept_info dept_info_type);

v_emp_dept_rec emp_dept_type;

How many fields can be addressed in v_emp_dept_rec?


one
four (*)
three
two

Correct

13. Which of the following statements about user-defined PL/SQL records is NOT true? Mark for Review
(1) Points
It can be a component of another PL/SQL record.
It can be defined as NOT NULL.
It can be used as an OUT parameter in a package procedure.
It must contain one or more components, but all the components must have scalar datatypes.
(*)
It is not the same as a row in a database table.

Incorrect. Refer to Section 6 Lesson 1.


14. Which of the following will successfully create a record type containing two fields, and a record Mark for Review
variable of that type? (1) Points
TYPE person_type IS RECORD
(l_name VARCHAR2(20),
gender CHAR(1));
person_rec person_type;

(*)
TYPE person_type IS RECORD

(l_name VARCHAR2(20),
gender CHAR(1));
person_rec TYPE person_type;
TYPE person_type IS (l_name VARCHAR2(20),
gender CHAR(1));
person_rec person_type;

TYPE person_type IS (l_name VARCHAR2(20),


gender CHAR(1));
person_rec TYPE person_type;

Incorrect. Refer to Section 6 Lesson 1.

ilearning.oracle.com/ilearn/en/learner/jsp/player.jsp?rco_id=2360210928&classroom_id=2374736877&scorm_attempt=1576282798762&sessionI… 1/2
14/12/2019 Database Programming with PL/SQL 2019 Learner - English

15. Consider the following code: Mark for Review


(1) Points
DECLARE
TYPE dept_info_type IS RECORD
(department_id departments.department_id%TYPE,
department_name departments.department_name%TYPE);
TYPE emp_dept_type IS RECORD
(first_name employees.first_name%TYPE,
last_name employees.last_name%TYPE),
dept_info dept_info_type);

v_dept_info_rec dept_info_type;
v_emp_dept_rec emp_dept_type;

How many fields can be addressed in v_dept_info_rec?


two (*)
one
four
three

Incorrect. Refer to Section 6 Lesson 1.

Previous Page 3 of 3 Summary

ilearning.oracle.com/ilearn/en/learner/jsp/player.jsp?rco_id=2360210928&classroom_id=2374736877&scorm_attempt=1576282798762&sessionI… 2/2

You might also like