background image
<< Double-booting system behavior | Size limits for Derby database objects >>
<< Double-booting system behavior | Size limits for Derby database objects >>

A Derby database

Derby Developer's Guide
22
· Only one instance of Derby can run in a JVM at a single time.
· The error log is located inside the system directory.
A Derby database
A Derby database contains dictionary objects such as tables, columns, indexes, and jar
files. A Derby database can also store its own configuration information.
The database directory
A Derby database is stored in files that live in a directory of the same name as the
database. Database directories typically live in system directories.
Note: An in-memory database does not use the file system, but the size limits listed in
the table later in this topic still apply. For some limits, the maximum value is determined
by the available main memory instead of the available disk space and file system
limitations.
A database directory contains the following, as shown in the following figure.
· log directory
Contains files that make up the database transaction log, used internally for data
recovery (not the same thing as the error log).
· seg0 directory
Contains one file for each user table, system table, and index (known as
conglomerates).
· service.properties file
A text file with internal configuration information.
· tmp directory
(might not exist.) A temporary directory used by Derby for large sorts and deferred
updates and deletes. Sorts are used by a variety of SQL statements. For databases
on read-only media, you might need to set a property to change the location of this
directory. See "Creating Derby Databases for Read-Only Use".
· jar directory
(might not exist.) A directory in which jar files are stored when you use database
class loading.
Read-only database directories can be archived (and compressed, if desired) into jar or
zip files. For more information, see
Accessing a read-only database in a zip/jar file
.
The following figure shows the files and directories in the Derby database directories that
are used by the Derby software.
Figure 2.
An example of a Derby database directory and file structure