|
 |
 |
 |
|
|
 |
|
|
Intense SQLJ - Java-based Stored Procedures for the Enterprise |
Duration: 3 days |
|
|
- Application Developers
- Programmers
- System designers
|
|
- Knowledge of database principles.
- Experience with Oracle in particular is preferred but not required.
- Experience with the Java programming language is required
|
|
|
Description |
This
course trains developers and designers in writing and using Oracle
stored procedures with the Java programming language. Both Oracle
and Java are established technologies in the corporate world,
especially in the deployment of dynamic web sites, where the web
content is generated in Java from records stored in an Oracle
database. In these systems, it is common for a single web page
to require several database operations, placing a burden on the
database engine and decreasing the responsiveness of the web server
as perceived by the end-user.
Storing procedures in the database server allows the application programmer to centralize
key components of the business logic. Moreover, it reduces the
traffic between the application program and the database server,
and it increases the visibility of the application logic to the
database engine. This can result in a significant performance
improvement: in a relevant case study, using a stored procedure
reduced the runtime of a critical piece of code from 3 minutes
to 2 seconds. However, in the past writing stored procedures required
learning a new language and associated libraries; typically, this
language was proprietary to the database vendor.
With the release of Oracle 8i, Oracle opened the doors to Java as a language
for writing stored procedures. This allows Java programmers to
write stored procedures using the classes and utilities they already
know, instead of learning the hundreds of functions available
in PL/SQL. The result is increased programmer productivity.
Java stored procedures communicate with the host database in the same ways that Java
programs communicate to databases in general. That is, Java stored
procedures can be built using either SQLJ or JDBC. In this course,
we will review both of these technologies, with a special emphasis
on how these techniques relate to Oracle stored procedures.
An added benefit of Java stored procedures is that the resulting Java classes can
be used outside of the database. Using Oracle's application server,
they can be directly accessed as remote objects via CORBA or EJB.
Moreover, Java stored procedures are constructed in the same way
as ordinary Java classes, and if appropriate steps are taken in
their construction, the classes can be repackaged and reused in
other settings. For example, the same class can be used in an
Oracle stored procedure and a client-side Java applet.
The course consists of 50% instruction and 50% lab exercises. |
|
Objectives |
This course teaches
a developer to build and use Oracled stored procedures using the
Java language. On completion of this course, students will be able to:
- Use Oracle's SQLJ and the JDBC API to write Java programs that communicate with Oracle
- Build Oracle stored procedures using Java
- Access Java stored procedures from Java applications via SQLJ and JDBC
- Identify the benefits and drawbacks of using stored procedures for part of
an application
|
|
Course Outline |
Database Programming Fundamentals
- Concepts
- Database connection
- Static SQL with SQLJ
- Dynamic SQL with JDBC
- Querying the database
- Updating the database records
- Updating the database schema
- Using stored procedures
|
|
Writing Basic Stored Procedures
- Concepts
- Functions and Procedures
- Accessing the host database
Advanced Stored Procedures
- Returning cursors
- Accessing network and file resources from stored procedures
- Accessing stored procedures outside of Oracle
| |
|
|