SYSTEM NEWS FOR SUN USERS
Vol 63 Issue 4 2003-05-26 Article 9957 from section "Oracle"
How to Get Unlimited Usage Patterns by Running Java Programming Language Code in the Database
Stored procedures allow a set of database operations to be processed in one
call. Java[TM] technology stored procedures use procedural logic
encapsulating multiple SQL statements that run within the database and are
invoked in one call, thereby avoiding multiple network round trips.
Oracle strategy is to enhance both languages and make them interoperate.
The Oracle white paper "Unleashing the Power of Java Stored Procedures"
discusses when it is best to use Oracle PL/SQL or Java technology stored
procedures. Which one to use depends on skills of programmers at a company
and application requirements. The following recommendations are offered:
- Use PL/SQL for SQL operations and access to all database types and
objects. PL/SQL was originally designed for stored procedures and
functions. Compiled PL/SQL packages can be moved to different platforms.
It is well suited for encapsulating SQL operations with procedural logic
and for manipulating all database object types.
- Use Java technology when you already have the skill set; use it for SQL
operations and for leveraging and interacting with the worlds of Web
Services, XML, the Java[TM] 2 Platform, Enterprise Edition (J2EE[TM]) and
Java technology. As opposed to PL/SQL, Java technology requires declaring
exceptions that can be thrown by methods in any class, thereby making
Java technology stored procedures more robust. All major database vendors
provide Java technology support in their databases. Java technology
programming in the database allows implementing more complex database
logic than PL/SQL and extends database functionality.
Common usage patterns of Java technology stored procedures are covered in
the white paper, as well as the support Oracle furnishes for the Java[TM]
DataBase Connectivity (JDBC[TM]) 2.0 API (a standard and common mechanism
for accessing SQL data from the Java platform). The white paper includes
code and illustrations.
Details at http://sun.systemnews.com/63/4/Oracle/index.shtml#9957
Have a custom version of 'System News for Sun Users' delivered to you
via email each week in PDF, text or HTML. Only the sections that you
select will be included in your copy of the news magazine. Subscribe at
(c) 2003 System News, Inc. http://www.systemnews.com