Part I. Java in the Database

At the beginning, there was SQL, a high-level query language for relational databases. Then the need to extend SQL with procedural logic gave birth to the concept of stored procedures and their corresponding languages, such as Oracle’s PL/SQL. Stored procedures allow developing data logic that run in the database, decoupled from business and computational logic, which runs in the middle tier. However, the proprietary nature of stored procedure languages, leads to some concerns (or perceptions) of vendor lock-in and skills shortage. Java is a response to these concerns. The ANSI SQLJ Part I specification[1] defines “SQL Routines and Types Using Java.” Although there are differences in their specific implementations, most RDBMSs, including Oracle, DB2, Sybase, and open source RDBMSs such as PostgreSQL and to some extent MySQL, support Java as a language for stored procedures and user-defined functions.

Chapter 1 discusses the rationale for stored procedures, the programming model, and languages. Chapter 2 tells you everything you ever wanted to know about the OracleJVM, its architecture, memory management, threading, class-sharing techniques, the native Java compiler (NCOMP), and security management and contrasts it with the JDK VM. Chapter 3 delves into the details of developing, deploying, and invoking Java applications in the database, including an extensive section on PL/SQL wrappers (also known as Call Spec) for publishing Java (i.e., make it known) to SQL, and mapping SQL datatypes to/from Java/JDBC datatypes. Chapter 4 describes atypical Java applications, which implement new database functionality using standard Java libraries. Finally, just for fun, in Chapter 5, you will run basic JACL, Jython, Scheme, and Groovy scripts in the database, as proof of the concept of supporting non-Java languages in the database.[2] There is a growing adoption of Java in the database, among DBAs and database developers, and after reading this book, you will probably become an aficionado, if that is not already the case!



[1] See Oracle JDBC, Oracle SQLJ, and JPublisher in Part II; then Database Web Services in Part III; and Putting Everything Together in Part IV.

[2] I must say that this proof of concept does not correspond to any Oracle product plan.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.19.243