Java DB - Derby (environments|architecture)


Derby is always an embedded product.

  • Embedded in an application
  • Embedded in a server framework. A server is an application that allows users to connect to Derby simultaneously and offers then a client/server architecture.

Different JDBC drivers are then available depending on the environment you choose for Derby.



An embedded environment is an environment in which only a single application can access a database at one time, and no network access occurs.

Derby runs in the same JVM as the application.

When an application starts an instance of Derby within its JVM, the application runs in an embedded environment. Loading the embedded driver starts Derby.

  • DB.VENDOR=javadb
  • DB.DRIVER=org.apache.derby.jdbc.EmbeddedDriver
  • DB.HOST=localhost
  • DB.PORT=3306
  • DB.SID=testdb
  • DB.URL=jdbc:derby:${DB.SID};create=true;
  • DB.USER=


A client/server environment is an environment in which multiple applications connect to Derby over the network.

Derby runs embedded in a server framework that allows multiple network connections. (The framework itself starts an instance of Derby and runs in an embedded environment. However, the client applications do not run in the embedded environment.)

You can also embed Derby in any Java server framework.

Powered by ComboStrap