Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Apache Derby is a transactional, embeddable, pure-Java relational database, derived from the original Cloudscape codebase. Derby is lightweight enough to be embedded directly into Java applications and/or accessed remotely by multiple users connected to Derby's network server.
In this article, I provide an overview and tutorial of the Apache Derby database along with its ancillary components.
Note: This article includes source code that can be downloaded from Resources.
Apache Derby, available under the Apache License Version 2.0, is a pure-Java relational database based on Java Database Connectivity (JDBC) and SQL standards. Apache Derby occupies about 2 megabytes of disk space for the core database engine and JDBC driver.
Apache Derby supports two modes: embedded and network server. The embedded mode allows Apache Derby to be used as an embedded database accessed from within the same JVM. The network server mode allows Apache Derby to be used as a standalone database that can be accessed from multiple clients outside the JVM that hosts the database.
The following technologies are the primary components of the Apache Derby distribution:
The nucleus of Apache Derby is an embedded database engine instantiated and executed by a Java application running in the same JVM.
Figure 1: The Apache Derby embedded engine architecture
The Apache Derby Network Server extends the Apache Derby database engine to provide multi-user connectivity to Derby databases within a single system or over a network. The Apache Derby Network Server uses the DRDA protocol standard (Distributed Relational Database Architecture) to handle queries and commands from clients. Databases exposed with the Apache Derby Network Server are accessed using the Derby Network client driver.
To expose an Apache Derby database using the network server, the following files must be in the classpath:
Figure 2: The Apache Derby Network Server architecture. Click on thumbnail to view full-sized image.
The Apache Derby tool, ij, is a scripting tool that allows JDBC-based SQL scripts to be executed against an Apache Derby database. The ij tool runs in its own JVM; therefore, it needs to access an Apache Derby database via the Apache Derby Network Server.
Startup scripts for Windows and Unix environments are provided with the Derby installation to start ij. If you are using Derby as a client-server environment, start the server before connecting to the Derby database. You can start ij by running the ij scripts for your environment in the %DERBY_HOME%/frameworks/embedded/bin/ directory or in the %DERBY_HOME%/frameworks/NetworkServer/bin/ directory.
To start ij, run the script provided or use this command:
java [<options>] org.apache.derby.tools.ij [-p <propertyFile>] [<inputFile>] database supporting multiple connections.
You can download the Apache Derby distribution from the Derby Website. Extract the archive appropriate for your environment to the directory of your choosing.
|Forum migration complete By Athen|
|Forum migration update By Athen|