Skip Headers

Oracle® Database Application Developer's Guide - Fundamentals
10g Release 1 (10.1)

Part Number B10795-01
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Index
Go to Master Index
Master Index
Go to Feedback page

Go to previous page
Go to next page
View PDF


The Oracle Database Application Developer's Guide - Fundamentals describes basic application development features of Oracle Database 10g. Information in this guide applies to features that work the same on all supported platforms, and does not include system-specific information.

This preface contains these topics:


Oracle Database Application Developer's Guide - Fundamentals is intended for programmers developing new applications or converting existing applications to run in the Oracle Database environment. This book will also be valuable to systems analysts, project managers, and others interested in the development of database applications.

This guide assumes that you have a working knowledge of application programming, and that you are familiar with the use of Structured Query Language (SQL) to access information in relational database systems.

Certain sections of this guide also assume a knowledge of the basic concepts of object-oriented programming.

Duties of an Application Developer

Activities that are typically required of an application developer include:


This document contains:

Part I: Introduction

This part introduces several ways that you can write Oracle Database applications. You might need to use more than one language or development environment for a single application. Some database features are only supported by, or are easier to access from, certain languages.

Chapter 1, "Programmatic Environments"

This chapter outlines the strengths of the languages, development environments, and APIs that Oracle Database provides.

Part II: Designing the Database

Before you develop an application, you need to plan the characteristics of the associated database. You must choose all the pieces that go into the database, and how they are put together. Good database design helps ensure good performance and scalability, and reduces the amount of application logic you code by making the database responsible for things like error checking and fast data access.

Chapter 2, "Selecting a Datatype"

This chapter explains how to represent your business data in the database. The datatypes include fixed- and variable-length character strings, numeric data, dates, raw binary data, and row identifiers (ROWIDs).

Chapter 3, "Maintaining Data Integrity Through Constraints"

This chapter explains how to use constraints to move error-checking logic out of your application and into the database.

Chapter 4, "Selecting an Index Strategy"

This chapter explains how to choose the best indexing strategy for your application.

Chapter 5, "How Oracle Database Processes SQL Statements"

This chapter explains SQL topics such as commits, cursors, and locking that you can take advantage of in your applications.

Chapter 6, "Coding Dynamic SQL Statements"

This chapter describes dynamic SQL, compares native dynamic SQL to the DBMS_SQL package, and explains when to use dynamic SQL.

Chapter 7, "Using Procedures and Packages"

This chapter explains how to store reusable procedures in the database, and how to group procedures into packages.

Chapter 8, "Calling External Procedures"

This chapter explains how to code the bodies of computation intensive procedures in languages other than PL/SQL.

Part III: The Active Database

You can include all sorts of programming logic in the database itself, making the benefits available to many applications and saving repetitious coding work.

Chapter 9, "Using Triggers"

This chapter explains how to make the database do special processing before, after, or instead of running SQL statements. You can use triggers for things like logging database access and validating or transforming data.

Chapter 10, "Working With System Events"

This chapter explains how to retrieve information, such as the user ID and database name, about the event that fires a trigger.

Chapter 11, "Using the Publish-Subscribe Model for Applications"

This chapter introduces the Oracle Database model for asynchronous communication, also known as messaging or queuing.

Part IV: Developing Specialized Applications

Chapter 12, "Using Regular Expressions With Oracle Database"

This chapter discusses regular expression support built into Oracle Database, regular expression syntax, and how to write queries using regular expressions in SQL.

Chapter 13, "Developing Web Applications with PL/SQL"

This chapter explains how to create dynamic Web pages and applications that work with the Internet, e-mail, and so on, using the PL/SQL language.

Chapter 14, "Porting Non-Oracle Applications to Oracle Database 10g"

This chapter lists features and techniques you can use to make applications run on Oracle Database 10g that were originally written for another, non-Oracle database.

Chapter 15, "Using Flashback Features"

This chapter describes how to use features that let you examine past data and its history, and to recover that data.

Chapter 16, "Using Oracle XA with Transaction Monitors"

This chapter describes how to connect Oracle Database with a transaction monitor.

Related Documentation

For more information, see these Oracle resources.


This section describes the conventions used in the text and code examples of this documentation set. It describes:

Conventions in Text

We use various conventions in text to help you more quickly identify special terms. The following table describes those conventions and provides examples of their use.

Convention Meaning Example


Bold typeface indicates terms that are defined in the text or terms that appear in a glossary, or both.

When you specify this clause, you create an index-organized table.


Italic typeface indicates book titles or emphasis.

Oracle Database Concepts

Ensure that the recovery catalog and target database do not reside on the same disk.

UPPERCASE monospace (fixed-width font)

Uppercase monospace typeface indicates elements supplied by the system. Such elements include parameters, privileges, datatypes, RMAN keywords, SQL keywords, SQL*Plus or utility commands, packages and methods, as well as system-supplied column names, database objects and structures, usernames, and roles.

You can specify this clause only for a NUMBER column.

You can back up the database by using the BACKUP command.

Query the TABLE_NAME column in the USER_TABLES data dictionary view.


lowercase monospace (fixed-width) font

Lowercase monospace typeface indicates executable, filenames, directory names, and sample user-supplied elements. Such elements include computer and database names, net service names, and connect identifiers, as well as user-supplied database objects and structures, column names, packages and classes, usernames and roles, program units, and parameter values.

Note: Some programmatic elements use a mixture of UPPERCASE and lowercase. Enter these elements as shown.

Enter sqlplus to open SQL*Plus.

The password is specified in the orapwd file.

Back up the datafiles and control files in the /disk1/oracle/dbs directory.

The department_id, department_name, and location_id columns are in the hr.departments table.

Set the QUERY_REWRITE_ENABLED initialization parameter to true.

Connect as oe user.

The JRepUtil class implements these methods.

lowercase monospace (fixed-width font) italic

Lowercase monospace italic font represents placeholders or variables.

You can specify the parallel_clause.

Run Uold_release.SQL where old_release refers to the release you installed prior to upgrading.

Conventions in Code Examples

Code examples illustrate SQL, PL/SQL, SQL*Plus, and other command-line statements. They are displayed in a monospace (fixed-width) font and separated from normal text, as shown in this example:

SELECT username FROM dba_users WHERE username = 'MIGRATE';

The following table describes typographic conventions used in code examples and provides examples of their use.

Convention Meaning Example

[ ]

Brackets enclose one or more optional items. Do not enter the brackets.

DECIMAL (digits [ , precision ])

{ }

Braces enclose two or more items, one of which is required. Do not enter the braces.



A vertical bar represents a choice of two or more options within brackets or braces. Enter one of the options. Do not enter the vertical bar.




Horizontal ellipsis points indicate either:

  • That we have omitted parts of the code that are not directly related to the example
  • That you can repeat a portion of the code

CREATE TABLE ... AS subquery;

SELECT col1, col2, ... , coln FROM employees;




Vertical ellipsis points indicate that we have omitted several lines of code not directly related to the example.


Other notation

You must enter symbols other than brackets, braces, vertical bars, and ellipsis points as shown.

acctbal NUMBER(11,2);
acct    CONSTANT NUMBER(4) := 3;


Italicized text indicates placeholders or variables for which you must supply particular values.

CONNECT SYSTEM/system_password

DB_NAME = database_name


Uppercase typeface indicates elements supplied by the system. We show these terms in uppercase in order to distinguish them from terms you define. Unless terms appear in brackets, enter them in the order and with the spelling shown. However, because these terms are not case sensitive, you can enter them in lowercase.

SELECT last_name, employee_id FROM employees;


DROP TABLE hr.employees;


Lowercase typeface indicates programmatic elements that you supply. For example, lowercase indicates names of tables, columns, or files.

Note: Some programmatic elements use a mixture of UPPERCASE and lowercase. Enter these elements as shown.

SELECT last_name, employee_id FROM employees;

sqlplus hr/hr


Documentation Accessibility

Our goal is to make Oracle products, services, and supporting documentation accessible, with good usability, to the disabled community. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Standards will continue to evolve over time, and Oracle is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For additional information, visit the Oracle Accessibility Program Web site at

Accessibility of Code Examples in Documentation

JAWS, a Windows screen reader, may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, JAWS may not always read a line of text that consists solely of a bracket or brace.

Accessibility of Links to External Web Sites in Documentation

This documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control. Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites.