Derby is a full-featured, open source relational database management system (RDBMS) that is based on Java and SQL. Derby is shipped under the name “Java DB” with the JDK.
Derby is written and implemented completely in the Java programming language. Derby provides users with a small-footprint standards-based database engine that can be tightly embedded into any Java based solution. Derby ensures data integrity and provides sophisticated transaction support. In the default configuration there is no separate database server to be installed or maintained by the end user. For more information on Derby, visit the Derby Web site at http://db.apache.org/derby.
Here is a good introduction to Java DB by Rick Hillegas (Youtube Video):
Derby / Java DB Extensions - Full Text Search Index
Derby does not have an out of the box full text search index capability. There is a desire to implement it using Apache Lucene, however it is not done yet. We have implemented a simple solution using relational tables, table functions and triggers. Whenever a row is inserted or updated, a trigger invokes a table function that indexes the words into a separate relational table which can be used in a join to have desired results.
Originally, Derby documentation was organized in PDF or HTML files. This made it inconvenient to search the documentation. To make it easier, we have created this web site where we have indexed the all of the books and made them searchable.
Before you install Derby, you should understand the deployment options and system requirements.
Deployment options The Derby software distribution provides two basic deployment options (also referred to as frameworks), the simple embedded option and the Derby Network Server option.
System requirements Derby is a database engine written completely in Java. The database will run in any certified Java Virtual Machine (JVM).
Derby implements an SQL-92 core subset, as well as some SQL-99 features.
This section provides an overview of the current SQL language by describing the statements, built-in functions, data types, expressions, and special characters it contains.
SQL expressions Syntax for many statements and expressions includes the term Expression, or a term for a specific kind of expression such as TableSubquery. Expressions are allowed in these specified places within statements.
SYSCS_DIAG diagnostic tables and functions Derby provides a set of system table expressions which you can use to obtain diagnostic information about the state of the database and about the database sessions.
This section describes the core Derby functionality. In addition, it details the most basic Derby deployment, Derby embedded in a Java application.
Application development overview Derby application developers use the Java Database Connectivity (JDBC) API, the application programming interface that makes it possible to access relational databases from Java programs.
Derby embedded basics This section explains how to use and configure Derby in an embedded environment.
Using in-memory databases For testing and developing applications, or for processing transient or reproducible data, you can use Derby's in-memory database facility.
This chapter lists tips for improving the performance of your Derby application. For a more in-depth discussion of performance, see Tuning databases and applications.
Managing the Derby Network Server The Derby Network Server can run as a stand-alone server, with Derby as an embedded part of the application.
Managing the Derby Network Server remotely by using the servlet interface You can use the servlet interface to manage the Network Server remotely. To use the servlet interface, the servlet must be registered with an Application Server, and derby.system.home must be known to the Application Server.
This section of the guide is divided into several administrative tasks.
Checking database consistency If you experience hardware or operating system failure, you can use the SYSCS_UTIL.SYSCS_CHECK_TABLE function to verify that the database is still consistent.
Backing up and restoring databases Derby provides a way to back up a database while it is online. You can also restore a full backup from a specified location.
Replicating databases Replication is an important feature of a robust database management system. In Derby, you start database replication by using connection URL attributes.
Logging on a separate device You can improve the performance of update-intensive, large databases by putting a database's log on a separate device, which reduces I/O contention.
Reclaiming unused space A Derby table or index (sometimes called a conglomerate) can contain unused space after large amounts of data have been deleted or updated.
JDBC connection basics Most of the Derby tools are JDBC applications. A JDBC application is one that uses the classes in the java.sql package to interact with a DBMS.
Tools and localization The Derby tools provide support for common localization features such as localized message files and GUI, locale-appropriate formatting of data, codesets, unicode identifiers and data, and database territories.