

Database Programming
Exam Materials
Course Introduction
Database Programming introduces students to the fundamental concepts, languages, and tools necessary to develop software applications that interact with relational database systems. The course covers topics such as SQL querying, data manipulation, database schema design, transactions, and stored procedures. Students learn to connect programming languages like Python or Java to database management systems (DBMS) to create, read, update, and delete data efficiently and securely. Through hands-on projects and practical exercises, learners gain experience in designing database applications that ensure data integrity, security, and performance, preparing them for roles in web development, data analysis, and enterprise software solutions.
Recommended Textbook
Oracle 11G PL SQL Programming 2nd Edition by Joan Casteel
Available Study Resources on Quizplus 10 Chapters
645 Verified Questions
645 Flashcards
Source URL: https://quizplus.com/study-set/1149

Page 2

Chapter 1: Introduction To PL/SQL
Available Study Resources on Quizplus for this Chatper
54 Verified Questions
54 Flashcards
Source URL: https://quizplus.com/quiz/22517
Sample Questions
Q1) ____ is a basic tool available with the Oracle server that allows a user to enter SQL and PL/SQL directly to the database server for processing.
A) OTN
B) Procedure Builder
C) SQL*Plus
D) TOAD
Answer: C
Q2) Describe the components of an application model.
Answer: An application model has three main components:
<b>User interface or screens</b>-The screens that are presented to the end user to enter information and/or take actions, such as clicking a button on the screen. The user interface component may be developed with tools, such as Visual Basic, Java, or Oracle Forms.
<b>Program logic or the brains behind the screens</b>-The programming code that provides the logic of what the application will do. PL/SQL addresses the "brains" or logic portions of an application.
Database-The database management system providing the physical storage structure for data and mechanisms to retrieve, add, change, and remove data. The Oracle server provides the database.
To view all questions and flashcards with answers, click on the resource link above.
Page 3

Chapter 2: Basic PL/SQL Block Structures
Available Study Resources on Quizplus for this Chatper
81 Verified Questions
81 Flashcards
Source URL: https://quizplus.com/quiz/22518
Sample Questions
Q1) Which of the following clauses ensures that a basic loop runs at least once?
A) EXIT WHEN
B) WHERE
C) CASE
D) LOOP
Answer: A
Q2) The following loop iterates four times. BEGIN
WHILE lv_cnt_num <= 5 LOOP
DBMS_OUTPUT.PUT_LINE( lv_cnt_num );
lv_cnt_num := lv_cnt_num + 1; END LOOP; END; A)True
B)False
Answer: False
Q3) The ____________________ section of the PL/SQL block contains code that creates variables, cursors, and types.
Answer: DECLARE
To view all questions and flashcards with answers, click on the resource link above.
Page 4
Chapter 3: Handling Data In PL/SQL Blocks
Available Study Resources on Quizplus for this Chatper
51 Verified Questions
51 Flashcards
Source URL: https://quizplus.com/quiz/22519
Sample Questions
Q1) What do most developers say about using a GOTO statement? Why?
Answer: Even though the GOTO statement exists, most developers believe this should be used very sparingly and only if no other method can be used to accomplish the task at hand. Why? The GOTO action interrupts the flow of execution, making it very difficult to understand and maintain the code. However, it is important to be aware of this statement as you may find yourself supporting existing code that includes GOTO statements.
Q2) A(n)<u> table of records</u> can handle more than one row of data.
A)True
B)False
Answer: True
Q3) It is possible to perform SQL commands on an associative array.
A)True
B)False
Answer: False
Q4) Anchored data types are similar to arrays used on other languages.
A)True
B)False
Answer: False

5
To view all questions and flashcards with answers, click on the resource link above.

Chapter 4: Cursors and Exception Handling
Available Study Resources on Quizplus for this Chatper
65 Verified Questions
65 Flashcards
Source URL: https://quizplus.com/quiz/22520
Sample Questions
Q1) Which of the following statements is correct?
A) The value of the SQLCODE can be used directly in an SQL statement.
B) The value of the SQLCODE is assigned to a variable.
C) The value of the SQLCODE can not be assigned to a variable.
D) The value of the SQLERRM can be used directly in an SQL statement.
Q2) Implicit cursors are declared and manipulated in the PL/SQL block code for handling a set of rows returned by a SELECT statement.
A)True
B)False
Q3) If the ____________________ clause of a SELECT statement contains either scalar or record variables and if more than one row is selected, the TOO_MANY_ROWS error is raised.
Q4) What is the difference between an explicit and an implicit cursor?
Q5) ____ refers to an attempted violation of a unique or primary key column constraint.
A) NO_DATA_FOUND
B) TOO_MANY_ROWS
C) DUP_VAL_ON_INDEX
D) CASE_NOT_FOUND
Q6) An attempted division by zero causes the ____________________ exception.
Page 6
To view all questions and flashcards with answers, click on the resource link above.

Chapter 5: Procedures
Available Study Resources on Quizplus for this Chatper
75 Verified Questions
75 Flashcards
Source URL: https://quizplus.com/quiz/22521
Sample Questions
Q1) A(n) ____ performs tasks automatically when a particular application event occurs, such as when the user clicks a button on the screen.
A) package
B) application trigger
C) stored procedure
D) database trigger
Q2) The term ____ refers to program code that resides on the user machine.
A) client-side
B) client/server
C) two-tier
D) server-side
Q3) A(n) ____________________ contains a RETURN clause and is used to manipulate data and return a single resulting value.
Q4) Program units are made flexible by using <u>parameters</u>, which are mechanisms to send values into and out of the program unit.
A)True
B)False
Q5) What is the difference between a function and a procedure?
To view all questions and flashcards with answers, click on the resource link above. Page 7

Chapter 6: Functions
Available Study Resources on Quizplus for this Chatper
51 Verified Questions
51 Flashcards
Source URL: https://quizplus.com/quiz/22522
Sample Questions
Q1) You cannot include <u>data type</u> information when declaring a formal parameter. ________________________
A)True
B)False
Q2) Formal parameters including the RETURN data type cannot include size information.
A)True
B)False
Q3) The term <u>passed by value</u> implies that a pointer to the value in the actual parameter is created instead of copying the value from the actual parameter to the formal parameter. _________________________
A)True
B)False
Q4) All of the following are purity level acronyms, except ____.
A) WNDS
B) RINDS
C) WNPS
D) RNPS
Q5) What are the main differences between a function and a procedure?
Q6) A(n) ____________________ cannot serve as an entire statement.
Page 8
To view all questions and flashcards with answers, click on the resource link above.

Chapter 7: PL/SQL Packages
Available Study Resources on Quizplus for this Chatper
68 Verified Questions
68 Flashcards
Source URL: https://quizplus.com/quiz/22523
Sample Questions
Q1) A(n) <u>package body</u> is the program unit that contains the code for any procedures and functions declared in the specification.
A)True
B)False
Q2) A REEF CURSOR data type declared in a package specification may be referenced by multiple program units.
A)True
B)False
Q3) The ____ packaged function purity level does not modify database tables.
A) RNDS
B) WNDS
C) WNPS
D) RNPS
Q4) All of the following represent packaged function purity levels, except ____.
A) WNDS
B) RNDS
C) WNPS
D) RIPS
Q5) Define the term package, and explain why it is used.
Page 9
To view all questions and flashcards with answers, click on the resource link above.

Chapter 8: Program Unit Dependencies
Available Study Resources on Quizplus for this Chatper
61 Verified Questions
61 Flashcards
Source URL: https://quizplus.com/quiz/22524
Sample Questions
Q1) ____ allows a user to modify program units in any schema.
A) CREATE PROCEDURE
B) CREATE ANY PROCEDURE
C) DROP ANY PROCEDURE
D) ALTER ANY PROCEDURE
Q2) A(n) ____________________________ occurs when one database object directly references other objects.
Q3) When a procedure is compiled, it stores the <u>datestamp </u>of any referenced objects. _________________________
A)True
B)False
Q4) ____ allows users to create program units in any schema and does not allow the modification or dropping of program units.
A) CREATE PROCEDURE
B) CREATE ANY PROCEDURE
C) ALTER PROCEDURE
D) EXECUTE ANY PROCEDURE
Q5) What is the purpose of the %TYPE and %ROWTYPE attributes?
Q6) What is the difference between the timestamp model and the signature model?
Page 10
To view all questions and flashcards with answers, click on the resource link above.

Chapter 9: Database Triggers
Available Study Resources on Quizplus for this Chatper
54 Verified Questions
54 Flashcards
Source URL: https://quizplus.com/quiz/22525
Sample Questions
Q1) Discuss three critical pieces of information regarding the WHEN clause of a trigger.
Q2) CREATE [OR REPLACE] TRIGGER trigger_name [BEFORE, AFTER] [List of DDL or Database System Events] [ON DATABASE | SCHEMA] Trigger body; The syntax above represents that of a(n) ____ trigger. A) statement
B) row level
C) system
D) Instead-Of
Q3) ____ triggers refer to database triggers that are fired by Data Definition Language (DDL) statements or database system events rather than DML actions.
A) ALTER
B) CREATE C) System
D) Instead-Of
Q4) In the syntax of the CREATE TRIGGER statement, the ____________________ clause can be used to change the OLD and NEW qualifier names to something of your choice.
Q5) What is the difference between a mutating table and a key-preserved table?
To view all questions and flashcards with answers, click on the resource link above. Page 11

Chapter 10: Oracle-Supplied Packages, Dynamic SQL, and
Hiding Source Code
Available Study Resources on Quizplus for this Chatper
85 Verified Questions
85 Flashcards
Source URL: https://quizplus.com/quiz/22526
Sample Questions
Q1) If a table contains any LOB columns, client tools such as SQL Developer cannot display the images, however, the GETLENGTH function can be used to confirm a file was loaded into the LOB column.
A)True
B)False
Q2) The <u>UTL_LINE</u> package allows access to files that reside on an operating system and are accessible from the database server.
A)True
B)False
Q3) The UTL_FILE package contains a PUT_LINE data type that is used to declare a file variable.
A)True
B)False
Q4) All of the following, except ____, represent steps required to perform DDL with the DBMS_SQL package.
A) OPEN_CURSOR
B) PARSE
C) BIND_VARIABLE
D) CLOSE_CURSOR
To view all questions and flashcards with answers, click on the resource link above. Page 12