Oracle 11g PLSQL Programming 2nd Edition Joan Casteel Test Bank
June 17, 2016 | Author: A Plus Team | Category: N/A
Short Description
Oracle 11g PLSQL Programming 2nd Edition Joan Casteel Test Bank
[email protected]...
Description
CHAPTER 1 - INTRODUCTION TO PL/SQL TRUE/FALSE 1. A programming language allows the actions of an end user to be converted into instructions that a computer can understand. ANS: T
PTS: 1
REF: 2
2. Structured Query Language (SQL) is considered a procedural language. ANS: F
PTS: 1
REF: 2
3. PL/SQL fully supports SQL data types. ANS: T
PTS: 1
REF: 3
4. PL/SQL allows blocks of statements to be sent to Oracle in a single transmission. ANS: T
PTS: 1
REF: 4
5. Database security can be increased with application processing supported by PL/SQL stored program units. ANS: T
PTS: 1
REF: 4
6. Program units can enable the access of database objects to users without the users being granted privileges to access the specific objects. ANS: T
PTS: 1
REF: 4
7. If you have a piece of code that has the potential of being used by various applications, saving this code on the server allows it to be shared by several applications. ANS: T
PTS: 1
REF: 5
8. A database model is a general framework or design that describes how the various components of an application will be addressed. ANS: F
PTS: 1
REF: 5
9. The three-tier application model is also referred to as a client/server application. ANS: F
PTS: 1
REF: 5
10. The term named program unit indicates that the program is saved in a database and, therefore, can be used or shared by different applications. ANS: F
PTS: 1
REF: 6
11. An event can range from a user action, such as clicking the button on the screen, to a table update statement that automatically calls a database trigger. ANS: T
PTS: 1
REF: 8
12. A procedure and function are named program units that are called to perform a specific task. ANS: T
PTS: 1
REF: 22
MODIFIED TRUE/FALSE 1. SQL is a procedural language that allows a programmer to code a logical sequence of steps to make decisions. _________________________ ANS: F, PL/SQL PTS: 1
REF: 2
2. SQL was originally modeled after Ada, a programming language built for the U.S. Department of Defense. _________________________ ANS: F, PL/SQL PTS: 1
REF: 3
3. PL/SQL supports the use of SQL data manipulation, transaction control, functions, cursors, operators, and pseudocolumns. _________________________ ANS: T
PTS: 1
REF: 4
4. The term interoperability implies that PL/SQL can run on any platform that Oracle can run on. _________________________ ANS: F, portability PTS: 1
REF: 4
5. A(n) programming language is a general framework or design that describes how the various components of the application will be addressed. _________________________ ANS: F, application model PTS: 1
REF: 5
6. The three-tier application model is also referred to as a client/server application. _________________________ ANS: F two-tier 2-tier two tier 2 tier
PTS: 1
REF: 5
7. A(n) package is any block of PL/SQL code that has been named so that it can be saved and reused. _________________________ ANS: F, named program unit PTS: 1
REF: 6
8. The term stored indicates that the program unit is saved in the database and, therefore, can be used or shared by different applications. _________________________ ANS: T
PTS: 1
REF: 6
9. Functions perform tasks automatically when a DML action occurs on the table with which it is associated. _________________________ ANS: F, Database triggers PTS: 1
REF: 6
10. PL/SQL’s role is to provide the logic to instruct the computer as to what to do when an event occurs. _________________________ ANS: T
PTS: 1
REF: 8
11. SQL*Plus is a basic tool available with the Oracle server that allows a user to enter SQL and PL/SQL statements directly to the Oracle database server for processing. _________________________ ANS: T
PTS: 1
REF: 9
MULTIPLE CHOICE 1. SQL is NOT a ____. a programming language . b language that allows the actions of the end user to be converted into instructions that a . computer can understand c language that allows us to add, delete, or change data in a database . d procedural language .
ANS: D
PTS: 1
REF: 2
2. All of the following are considered to be programming languages, except ____. a Java c SQL . . b VBScript d Oracle . .
ANS: D
PTS: 1
REF: 2
3. Which of the following statements is true? a Oracle considers PL/SQL to be a procedural language extension of SQL. . b Oracle does not consider PL/SQL to be a procedural language. . c Oracle considers SQL to be a procedural language. . d Oracle does not consider SQL to be a programming language. .
ANS: A
PTS: 1
REF: 2
4. Procedural languages allow developers to ____. a write queries c . . b manipulate databases d . .
ANS: D
PTS: 1
create tables perform decision-making logic
REF: 3
5. The term portability refers to the ability of PL/SQL to ____. a automate tasks . b group SQL statements before sending them to Oracle for execution . c tighten security . d run on any platform that Oracle can run on .
ANS: D
PTS: 1
REF: 4
6. A(n) ____ is a general framework or design that describes how the various components of the application will be addressed. a programming language c database . . b procedural language d application model . .
ANS: D
PTS: 1
REF: 5
7. All of the following are components of the application model, except ____. a Screens c Database . .
b Programming logic .
ANS: D
PTS: 1
d .
Operating System
REF: 5
8. Which of the following is considered the “brains behind the screens?” a Database c User interface . . b GUI d Programming logic . .
ANS: D
PTS: 1
REF: 5
9. The two-tier application model is also referred to as a(n) ____. a client/server application c client application . . b database application d server application . .
ANS: A
PTS: 1
REF: 5
10. Which of the following can receive and return multiple values? a Procedure c Database trigger . . b Function d Package . .
ANS: A
PTS: 1
REF: 6
11. Which of the following typically returns only one value? a Procedure c Database trigger . . b Function d Package . .
ANS: B
PTS: 1
REF: 6
12. PL/SQL code that automatically runs when a particular button is clicked on the screen is an example of a(n) ____. a package c function . . b application trigger d procedure . .
ANS: B
PTS: 1
REF: 7
13. In a three-tier application model, the user interface is often referred to as a(n) ____. a GUI c program unit . . b thin client d OTN . .
ANS: B
PTS: 1
REF: 7
14. Which of the following statements about the three-tier application model is true? a Application code is loaded onto the client machine. . b Application code is not loaded onto the client machine. . c All the application code resides on a database server. . d All the application code is stored in a package. .
ANS: B
PTS: 1
REF: 7
15. Which of the following statements is unique to the three-tier application model? a It is referred to as a client/server application. . b In this model an executable program or application is loaded onto the user’s computer . that contains the user screens and some programming logic. c Application code resides on the application server. . d Processing can take place on the client-side. .
ANS: C
PTS: 1
REF: 7
16. Which of the following statements is correct? a The application server contains the user interface and processing logic, which together, . respond to user actions. b The user interface is delivered from the database server that contains the logic to respond . to user actions. c The user interface is delivered from the SQL database that contains the logic to respond . to user actions. d The user interface is delivered from the thin client that contains the logic to respond to . user actions.
ANS: A
PTS: 1
REF: 8
17. Which of the following is an example of an event? a User interface c Clicking a button on the screen . . b Application logic d Server-side processing
.
ANS: C
.
PTS: 1
REF: 8
18. ____ 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 c SQL*Plus . . b Procedure Builder d TOAD . .
ANS: C
PTS: 1
REF: 9
19. Which of the following serves as a visual representation of a database? a ERD c EDD . . b ERP d DFD . .
ANS: A
PTS: 1
REF: 13
COMPLETION 1. Because a PL/SQL engine is part of the ____________________, code modules can be used or called from almost any application development language. ANS: server PTS: 1
REF: 4
2. A program that can run on any platform is considered ____________________. ANS: portable PTS: 1
REF: 4
3. It can be more efficient to process ____________________ statements stored within the database versus those stored in application code. ANS: SQL Structured Query Language PTS: 1
REF: 4
4. The term ____________________ indicates the program unit is saved in the database, and therefore can be used or shared by different applications. ANS: stored
PTS: 1
REF: 6
5. A(n) ____________________ typically returns only one value. ANS: function PTS: 1
REF: 6
6. A(n) _____________________ performs a task automatically when a Data Manipulation Language (DML) action occurs on the associated table. ANS: database trigger PTS: 1
REF: 6
7. An example of an application ____________________ is PL/SQL code that automatically runs when a particular button is clicked on the screen. ANS: trigger PTS: 1
REF: 7
8. The ____________________ application model attempts to ease application maintenance and enables the support of larger numbers of users. ANS: three-tier 3 tier three tier 3-tier PTS: 1
REF: 7
9. A(n) ____________________ can range from a user action, such as clicking a button on the screen, to a table update statement that automatically calls a database trigger. ANS: event PTS: 1
REF: 8
ESSAY 1. Describe at least four advantages of using PL/SQL. ANS: Tight integration with SQL—You can leverage your knowledge of SQL because PL/SQL supports the use of SQL data manipulation, transaction control, functions, cursors, operators, and pseudocolumns. In addition, PL/SQL fully supports SQL data types, which reduces the need to convert data passed between your applications and the database.
Increased performance—First, PL/SQL allows blocks of statements to be sent to Oracle in a single transmission. This is important in reducing network communication between your application and Oracle, especially if your application is database intensive. PL/SQL blocks can be used to group SQL statements before sending them to Oracle for execution. Otherwise, each SQL statement must be transmitted individually. Second, PL/SQL code modules, or stored program units, are stored in executable form—making procedure calls very efficient. Third, executable code is automatically cached in memory and shared among users. This can speed processing tremendously with a multiuser application that has repeated calls to modules of code. Fourth, a PL/SQL engine is embedded in Oracle developer tools so that PL/SQL code can be processed on the client machine. This reduces network traffic. Increased productivity—PL/SQL can be used in many of the Oracle tools, and the coding is the same within all. Therefore, your PL/SQL knowledge can be used with many development tools, and the code created can be shared across applications. Because a PL/SQL engine is part of the server, these code modules can also be used or called from almost any application development language. You can use Visual Basic or Java to develop an application but still harness the power of PL/SQL with Oracle. Portability—PL/SQL can run on any platform that Oracle can run. This is important to enable a developer to easily deploy an application on different platforms. Tighter security—Database security can be increased with application processing supported by PL/SQL stored program units. Program units can enable the access of database objects to users without the users being granted privileges to access the specific objects. Therefore, the users can access these objects only via the PL/SQL program units. PTS: 1
REF: 4
2. Describe the components of an application model. ANS: An application model has three main components: User interface or screens—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. Program logic or the brains behind the screens—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. PTS: 1
REF: 5
3. Describe the three-tier application model. ANS: The three-tier model is growing in popularity because it attempts to ease application maintenance and enables the support of larger numbers of users. In this scenario, the user interface is typically presented via a Web browser and is often referred to as a thin client. Application code is not loaded onto the client machine; all the application code now resides on an application server, which is also referred to as the middle tier. Three layers now exist in this model: the user interface, the application server, and the database server. The Oracle application server allows the deployment of Oracle Forms applications via the Web. The application server contains the user interface and processing logic, which together, respond to user actions and, in turn, send appropriate code to the database server for processing. PTS: 1
REF: 7|8
View more...
Comments