Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In Chapter 2, we looked at an example of why you need to know PL/SQL. We revisited the topic in the section “Where Should Your SQL Statements Reside, in Java or PL/SQL?” of Chapter 6, where you saw ample justification for why you should, in general, encapsulate your database-related logic in PL/SQL and use CallableStatement to call the database-related logic from Java (instead of putting your SQL statement strings in your Java code and invoking them using PreparedStatement). This strategy implies that you need to be a good PL/SQL programmer if you want to write effective JDBC programs. Note that the underlying philosophy is true even if you don't use Oracle, in which case you need to be proficient in the equivalent procedural language of your database (most prominent database vendors provide such a procedural language). In this section, we will summarize and expand on our list of reasons to use PL/SQL extensively in code.