Java Reference
In-Depth Information
Javasupportsdatabasecreation,access,andmoreviaitsrelationaldatabase-oriented
JDBC(JavaDataBaseConnectivity)API,andthissectionintroducesyoutoJDBC.Be-
fore doing so, it introduces you to Java DB, the RDBMS that I'll use to demonstrate
various JDBC features.
Java DB
First introduced by Sun Microsystems as part of JDK 6 (and not included in the JRE)
to give developers an RDBMS to test their JDBC code, Java DB is a distribution of
Apache's open-source Derby product, which is based on IBM's Cloudscape RDBMS
codebase.Thispure-JavaRDBMSisalsobundledwithJDK7(andnotalsointheJRE).
It'ssecure,supportsJDBCandSQL(includingtransactions,storedprocedures,andcon-
currency), and has a small footprint—its core engine and JDBC driver occupy 2MB.
Note A JDBC driver is a classfile plug-in for communicating with a database. I'll
have more to say about JDBC drivers when I introduce JDBC later in this chapter.
JavaDBiscapableofrunninginanembeddedenvironmentorinaclient/serveren-
vironment. In an embedded environment, where an application accesses the database
engine via Java DB's embedded driver , the database engine runs in the same JVM as
theapplication. Figure9-3 illustratestheembeddedenvironmentarchitecture,wherethe
database engine is embedded in the application.
Figure 9-3. No separate processes are required to start up or shut down an embedded database
engine.
Search WWH ::




Custom Search