Tải bản đầy đủ (.pdf) (50 trang)

Tài liệu basic of procedure builder pptx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (616.93 KB, 50 trang )

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


Procedure Builder is an integrated development environment. It provides for the
editing, compiling, testing, and debugging of PL/SQL programs within a single tool.
In addition, it enables developers to drag and drop program units between the client
and server. You can improve your application development efforts by using the
features available in Procedure Builder. You will become familiar with these features
by learning about each component’s function. Once you are familiar with the
Procedure Builder environment, you will cover the PL/SQL syntax.
Procedure Builder Features
Component
Description
Object Navigator Manage PL/SQL constructs.
Perform debug actions.
PL/SQL Interpreter Debug PL/SQL code.
Evaluate PL/SQL code in real time.
Program Unit Editor Create and edit PL/SQL source code.
Stored Program Unit
Editor
Create and edit server-side PL/SQL source code.
Database Trigger Editor Create and edit database triggers.
For more information, see
Oracle Procedure Builder Developer’s Guide, Release 1.5.
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder19Ć6
Procedural Programming Capabilities
Basics of Procedure Builder 19Ć7
Oracle Procedure Builder Capabilities
Procedure Builder is an integrated, interactive environment that you can use to create,
execute, and debug PL/SQL programs. Using Procedure Builder, you can build
portable database programs quickly and easily.
Integrated PL/SQL Development Environment
D

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

The easiest and most common place to enter PL/SQL source code is in the Program
Unit editor. You can use it to edit, compile, and browse warning and error messages
during application development.
The Stored Program Unit Editor
The Stored Program Unit editor is a GUI environment for editing server-side
packages and subprograms. The compile operation submits the source text to the
server-side PL/SQL compiler. To debug server-side program units you can drag a
copy of the program unit to the client side using the Object Navigator.
The Database Trigger Editor
The Database Trigger editor is a GUI environment for editing database triggers. The
compile operation submits the source text to the server-side PL/SQL compiler.
Online Help
Oracle Procedure Builder has a help facility that provides assistance at any time
during your session. You can access it from the menu bar.
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder19Ć10
Using the Quick Tour
Basics of Procedure Builder 19Ć11
Procedure Builder Components
continued
Using the Quick Tour
The Quick Tour, another type of online help, introduces you to product terminology,
workflow, and theoretical concepts. This is an excellent resource to get started with
Procedure Builder. You can invoke the Quick Tour by choosing the Quick Tour menu
item from the Help menu.
Procedure Builder Basics
Become familiar with the Object Navigator to create and manage your PL/SQL
objects. Also, learn the terminology used in the Object Navigator.
Developing a Program Unit
Review each step to develop a program unit. Create, edit, and compile a PL/SQL
program unit using the Program Unit and Database Trigger editors.

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

require.
Button
Action
Next Card Advance one card.
Back Return to the previous card.
Tell Me Obtain more information about a topic.
Show Me View a short movie or animation on a task.
Options Set Cue Card options.
Exit Exit Cue Cards.
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder19Ć14
4
The Object Navigator
1
5
2
4
4
5
3
Navigator drop down list1 Subobject indicator2 Type icon3
Object name
4 Find field5
Basics of Procedure Builder 19Ć15
The Object Navigator
The Object Navigator provides immediate access to every object in your development
environment. You can create and manipulate all of your PL/SQL program units,
libraries, debug actions, and variables from the Object Navigator.
Object Navigator Components
Navigator Component
Description

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.

Copying an object also copies any objects owned by that object.
Paste Pastes the cut or copied module into the selected location. Note
that objects must be copied to a valid location in the object
hierarchy.
Create Creates a new instance of the currently selected object.
Delete Deletes the selected object with confirmation.
Expand Expands the first level of subobjects of the currently selected
object.
Collapse Collapses the first level of subobjects of the currently selected
object.
Expand All Expands all levels of subobjects of the currently selected object.
Collapse All Collapses all levels of subobjects of the currently selected object.
Introduction to Oracle: SQL and PL/SQL Using Procedure Builder19Ć18
Objects of the Navigator
Basics of Procedure Builder 19Ć19
The Object Navigator
continued
Object Navigator Objects
By using the Object Navigator, you can display a hierarchical listing of all objects
you have access to during your session.
Object Node
Description
Program Units PL/SQL construct that can be independently recognized and
processed by the PL/SQL compiler.
Program Units –
Specification
Name, parameter, and return type (functions only) of the
program unit.
Program Units –
References

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

×