background image
<< Replicating databases | Derby Network Server >>

Part I - Derby Server Guide

<< Replicating databases | Derby Network Server >>
Derby Server and Administration Guide
11
Part one: Derby Server Guide
This part of the guide explains the Derby Network Server and other server frameworks.
Derby in a multi-user environment
This section describes how to use Derby in a multi-user (or "server") environment.
Derby in a server framework
In a sense, Derby is always an embedded product. You can embed it in an application
in which users access the database from a single JVM or you can embed it in a server
framework (an application that allows users from different JVMs to connect to Derby
simultaneously). When Derby is embedded in an application, the local JDBC driver calls
the local Derby database. When Derby is embedded in a server framework, the server
framework's connectivity software provides data to multiple client JDBC applications over
a network or the Internet.
For local or remote multi-user connectivity (multiple users who access Derby from
different JVMs), use the Derby Network Server. If you require features that are not
included in the Network Server, you can embed the basic Derby product in another
server framework.
Connectivity configurations
There are several ways to embed Derby in a server framework:
Use the Network Server
This is the easiest way to provide connectivity to multiple users who are accessing
Derby databases from different JVMs. The Derby Network Server provides this kind
of connectivity to Derby databases within a single system or over a network.
Purchase another server framework
You can use Derby within many server frameworks, such as IBM WebSphere
Application Server.
Write your own framework
Derby's flexibility allows other configurations as well. For example, rather than
embedding Derby in a server that communicates with a client that uses JDBC, you
can embed Derby within a servlet in a web server that communicates with a browser
using HTTP.
Multiple-client features available in Derby
Derby contains some features that are useful for developing multi-user applications.
Row-level locking:
To support multi-user access, Derby utilizes row-level locking. However, you can
configure Derby to use table-level locking in environments that have few concurrent
transactions (for example, a read-only database) . Table-level locking is preferable if
there are few or no writes to the server, while row-level locking is essential for good
performance if many clients write to the server concurrently. The Derby optimizer tunes
lock choice for queries automatically.
Multiple concurrency levels:
Derby supports SERIALIZABLE (RR), REPEATABLE (RS), READ COMMITTED (CS),
and READ UNCOMMITTED (UR) isolation levels.
CS