Basics of Procedure Builder
19
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder19Ć2
Objectives
Basics of Procedure Builder 19Ć3
Objectives
A key feature of procedural programming is the ability to create and debug code
quickly and easily. Procedure Builder provides all of the functionality necessary
for you to successfully develop and debug PL/SQL programs. This lesson
enables you to manipulate PL/SQL code using Procedure Builder.
At the end of this lesson, you should be able to
D
Identify the advantages of developing and debugging PL/SQL programs in
Procedure Builder.
D
Manage program units by using the Object Navigator.
D
Execute program units and SQL statements by using the PL/SQL Interpreter.
D
Define and compile procedures by using the Program Unit editor.
D
Define and compile database procedures by using the Stored Program Unit editor.
D
Set a breakpoint to suspend program execution.
D
Control the execution of an interrupted PL/SQL program unit.
D
Test possible solutions by changing variables and procedures at runtime.
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder19Ć4
Basics of Procedure Builder 19Ć5
Overview
Create and edit subprograms.
D
Compile subprograms to perform syntactical error checking.
D
Test subprograms.
D
Debug subprograms.
Unified ClientĆServer PL/SQL Development
D
Create database triggers.
D
Create stored procedures and move them to the client to debug.
D
Build and edit client-side libraries.
D
Create client-side program units and move them to the server.
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder19Ć8
Procedure Builder Components
Procedure Builder Components
Basics of Procedure Builder 19Ć9
Procedure Builder Components
The Object Navigator
The Object Navigator provides an outline style interface to browse objects, view the
relationships between them, and edit their properties.
The Interpreter
The Interpreter is the central debugging workspace of Procedure Builder. It is a
two-pane window where you display, debug, and run PL/SQL program units. It also
interactively supports the evaluation of PL/SQL constructs, SQL commands, and
Procedure Builder commands.
The Program Unit Editor
Debugging a Program Unit
This section describes how to debug a program unit using the PL/SQL Interpreter. It
describes how to set breakpoints, step through your code, and peruse the Stack node
to change the value of the variable.
Organizing PL/SQL
Step through application partitioning between the client and server, including using
libraries and moving subprograms between the client and server.
Procedure Builder Features
Review the kinds of application-building tasks you can perform using Procedure
Builder.
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder19Ć12
Using Cue Cards
Basics of Procedure Builder 19Ć13
Procedure Builder Components
continued
Using Cue Cards
Developer/2000 provides further help in the form of Cue Cards. Their purpose is to
provide just-in-time coaching for frequently performed tasks. You can invoke Cue
Cards by selecting the Cue Cards menu item from the Help menu.
Cue cards contain two types of content: task and concept. Task cards list the steps to
complete a task, while concept cards describe a particular concept with static
graphics. When invoked, Cue Cards display a list of topics that are divided into two
categories:
D
Task: What would you like to do?
D
Concept: Learn About
To display the cue card for any of these topics, click the appropriate button to the left
of the item.
Cue Cards include a set of six buttons that you use to navigate to the information you
Navigator drop down list Indicates the name of the currently selected object.
Subobject indicator Indicates whether an object can be expanded to view
its subobjects.
Type icon Indicates the object type.
Object name Indicates the name of the object.
Find field Used to search for a named object.
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder19Ć16
The Object Navigator Vertical Button Bar
2
3
4
1
Open/save1 Cut/copy/paste2 Create/delete3
Expand/collapse/
expand all/collapse all
4
Basics of Procedure Builder 19Ć17
The Object Navigator
continued
The Object Navigator Vertical Button Bar
The Vertical Button Bar on the Object Navigator provides a convenient access for
many of the actions frequently performed from the File, Edit, and Navigator menus.
Elements of the Vertical Button Bar
Element
Description
Open Opens a library from the file system or from the Oracle7 Server.
Save Saves a library on the file system or on the Oracle7 Server.
Cut Cuts the selected object and stores it in the clipboard. Cutting an
object also cuts any objects owned by that object.
Copy Makes a copy of the selected object and stores it in the clipboard.
Procedures, functions, anonymous blocks, and tables that the
program unit references.
Program Units –
Referenced By
Procedures, functions, anonymous blocks, and tables that
reference the program unit.
Libraries Collection of PL/SQL packages, procedures, and functions
stored in the database or the file system.
Attached Libraries Referenced libraries stored in the database or the file system.
Built-in Packages PL/SQL constructs that can be referenced while debugging
program units.
Debug Actions Actions that enable you to monitor or interrupt the execution
of PL/SQL program units.
Stack Chain of subprogram calls, from the initial entry point down
to the currently executing subprogram.
Database Objects Collection of server-side stored program units, libraries,
tables, and views.
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder19Ć20