Chapter 1 - Introduction to Pl/Sql
Total Page:16
File Type:pdf, Size:1020Kb
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 create tables . b manipulate databases d perform decision-making logic . ANS: D PTS: 1 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 d Operating System . ANS: D PTS: 1 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.