Database Programming With PL - SQL 2019 Learner - English-Merged
Database Programming With PL - SQL 2019 Learner - English-Merged
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
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. (*)
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 (*)
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
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
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
Correct
v_emp_dept_rec emp_dept_type;
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.
(*)
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;
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
v_dept_info_rec dept_info_type;
v_emp_dept_rec emp_dept_type;
ilearning.oracle.com/ilearn/en/learner/jsp/player.jsp?rco_id=2360210928&classroom_id=2374736877&scorm_attempt=1576282798762&sessionI… 2/2