Java & Databases
What is actually a database application?
Initially one is apt to think about search engines such as Altavista, or
perhaps a way to retrieve and handle your organizations different kinds
of information, e.g. product data. But actually a database application
can be any application that needs access to a lot of data, or selected
parts thereof. Here Java's cross-platform possibilities can really stretch
your imagination. As a way to integrate the information via an intranet
in your company, or to handle and present sophisticated data in your organization,
or for your clients, Java makes your solutions simple, cross-platform,
and user intuitive.
With the JDBC
(Java DataBase Connectivity) interface, Java can access almost any existing
commercial database. JDBC connects to a database via a driver, which is
a set of classes that implement the JDBC interface. The JDBC
driver can be written partly or purely in Java, and can be used to
connect, either directly, to the database, or via some kind of middleware.
The latter is a good alternative when security considerations exist, such
as when accessing data via the internet. The middleware can, of course,
also be written in Java, being e.g. a servlet,
and use a vendor neutral protocol to talk to the client.
Together with a technology for distributed
objects, such as Java
RMI (Remote Method Invocation) and Java
IDL (Java's interface to CORBA), Java and JDBC can be used to
create efficient and sophisticated client-server solutions.
JDBC is a part of the JDK 1.1 release,
but can also be used in connection with JDK1.0 if the appropriate classes
are downloaded to the client (this can be done automatically). Take a look
at a nice overview
and comparison of the different kinds of architectures for JDBC drivers.
With the upcoming Java
Blend, objects will automatically (automagically) map onto the corresponding
database structures (which can be relational databases, or other kinds
of databases). This will make the underlying database architecture transparent
to to programmer, and allow for efficient construction of complex information
systems.