File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes J2EE & PL/SQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "J2EE & PL/SQL" Watch "J2EE & PL/SQL" New topic


Chris Baron
Ranch Hand

Joined: Mar 21, 2003
Posts: 1061
I just learn the PL/SQL syntax, because I saw so many Job-Offerings with the required skill combination of J2EE and PL/SQL. But i can't make a picture how it's fitting together.
My question:

What are typical environments for such a setting?
- e.g. would i have to expect a migration project?
- or is it common, that parts of the business logic reside in these DB-scripts and there is a interface to the J2EE side?

Thanks and Sorry, if this is not the right forum
stu derby
Ranch Hand

Joined: Dec 15, 2005
Posts: 333
PL/SQL is the stored procedure language for Oracle databases (maybe somebody else has adopted the syntax as well, but I don't know that). Other databases use other stored procedure languages (some even use Java, including Oracle as an alternative language).

A J2SE (or J2EE) program can invoke a database stored procedure (of any language) using JDBC's CallableStatement.
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3753

Don't worry Chris, this is the forum for that (although there is an Oracle forum for Oracle-specific questions if you want to job working with Oracle).

The picture is cloudy at best. The original intent was that complex database transactions/procedures would be put in a stored procedure and the application would make simplistic calls to the database. Some systems have done an excellent job utilitizing this especially in the cases of procedures would be highly expensive if handled by business logic.

These days though, especially with J2EE and object relational mappings, such systems are not that common. At some point there became a need for application servers to have more control over their data, coupled with the fact that stored procedures are *extremely* non-portable (trying rewriting 1000+ stored procedures to switch databases...) and they are becomming a rare sight.

In fact, the only time I see them used anymore in business logic is to perform read-only queries that would be too costly (either network bandwidth or processing power) to perform by the application server.

[OCA 8 Book] [Blog]
Chris Baron
Ranch Hand

Joined: Mar 21, 2003
Posts: 1061
Thanks a lot for the orientation.
I agree. Here's the link:
subject: J2EE & PL/SQL
It's not a secret anymore!