So here you are, the eager Java developer, about to embrace JDBC (Java
Database Connectivity), the next item on your Java technology checklist. If
you followed my last article (JDJ, Vol. 5, issue 9), you've selected a
database system and a JDBC driver to help you master this technology. Now you
want to jump in and start writing code. Perhaps you've bought a JDBC book,
read your JDBC driver documentation or collected various JDBC articles from
magazines (such as this one). Unfortunately, many of these resources skim the
introductory topics or, worse, offer seemingly conflicting code examples.
This article discusses the details of connecting a Java application to a
database using JDBC, including how the process has changed with the evolution
of the Java programming language.
In theory, the basics of connecting a running Java application to a database
are quite simple... (more)
After reading the previous articles in this series, we're now ready to apply
our Java database knowledge to real-world applications. Perhaps the simplest
example is utilizing JSP to dynamically present data stored in our database
over the Internet.
While many commercial systems exist that can facilitate the entire
development and deployment process (e.g., JDeveloper and Oracle 8i), I'll
focus instead on one of the products from the Apache Software Foundation
(ASF). The Tomcat server provides the reference implementation for both JSPs
and Servlets. Because it's an open-source org... (more)
Since this issue of JDJ is devoted to Linux, it's only appropriate to focus
on architectural issues. In our case this means examining the various
software architectures that use databases in Java applications as well as
some details of the low-level operations that occur between a database, a
JDBC driver, and a Java application.
At a fundamental level, Java-based database applications can come in two
flavors: two-tiered or three-tiered. The tiers don't indicate how many
servers or components are involved; instead, they represent conceptual levels
into which the different parts o... (more)
In this series we've explored the process behind selecting a database and a
JDBC driver as well as establishing a connection between your Java
application and your database using JDBC. To actually do something useful,
however, you need to be able to actively interact with a database using JDBC.
Early on in their history, relational database vendors agreed on a common
interpretive language called SQL (Structured Query Language) that could
interact with any database that supported this standard. This tactic helped
build a large user base and a large number of third-party tools. Rela... (more)
A primary benefit of using the Java programming language is the wide range of
packages available for simplifying a variety of programming tasks. One of
these tasks is to provide a persistent storage for Java programs. Actually,
this can be accomplished using several different techniques, including
Serialization, SQLJ, JDBC and eventually JDO.
JDBC (Java Database Connectivity) is routinely covered by many different
authors in varying detail; however, the fundamental basics of using it to
connect a Java application to a database is often casually discussed or,
worse, ignored compl... (more)