User's Guide
PART 3. Java in the Database
CHAPTER 16. Welcome to Java in the Database
Adaptive Server Anywhere is a runtime environment for Java. This means that Java classes can be executed in the database server. Building a runtime environment for Java classes into the database server provides powerful new ways of managing and storing data and logic.
Java in the database offers the following:
You can reuse Java components in the different layers of your application—client, middle-tier, or server—and use them wherever makes most sense to you. Adaptive Server Anywhere becomes a platform for distributed computing.
A more powerful language than stored procedures for building logic into the database.
Java classes become rich user-defined data types.
Methods of Java classes provide new functions accessible from SQL.
Java can be used in the database without jeopardizing the integrity, security and robustness of the database.
The Adaptive Server Anywhere Java implementation is based on the SQLJ Part 1 and SQLJ Part 2 proposed standards. SQLJ Part 1 provides specifications for calling Java static methods as SQL stored procedures and user-defined functions SQLJ Part 2 provides specifications for using Java classes as SQL user-defined data types.
Java is a relatively new programming language with a growing but still limited knowledge base. This documentation is written not only for experienced Java developers, but also for the many readers who are unfamiliar with the language, its possibilities, its syntax and its use.
For those readers familiar with Java, there is much to learn about how to use Java in a database. Sybase is not only extending the capabilities of the database with Java, but also extending the capabilities of Java with the database.
The following table outlines the documentation regarding the use of Java in the database.
Title |
Purpose |
---|---|
Welcome to Java in the Database (this chapter) |
Java concepts and how they are applied in Adaptive Server Anywhere. |
Practical steps to using Java in the database. |
|
Accessing data from Java classes, including distributed computing. |
|
Testing and debugging Java code running in the database. |
|
Adaptive Server Anywhere Reference. |
The Reference Manual includes material on the SQL extensions that support Java in the database. |
Reference guide to Sun's Java API |
Online guide to Java API classes, fields and methods. Available as Windows Help only. |
Thinking in Java by Bruce Eckel. |
Online book that teaches how to program in Java. Supplied in Adobe PDF format in the jxmp subdirectory of your Adaptive Server Anywhere installation directory. |
The following table is a guide to which parts of the Java documentation apply to you, depending on your interests and background. It is meant to act only as a guide and should not limit your efforts to learn more about Java in the database.
If you ... |
Consider reading ... |
---|---|
Are new to object-oriented programming. |
Thinking in Java by Bruce Eckel. |
Want an explanation of terms such as instantiated, field and class method. |
|
Are a Java developer who wants to just get started. |
|
Want to know the key features of Java in the database. |
|
Want to find out how to access data from Java. |
|
Want to prepare a database for Java. |
|
Want a complete list of supported Java APIs. |
|
Are trying to use a Java API class and need Java reference information. |
The online guide to Java API classes (Windows Help only). |
Want to see an example of distributed computing. |