# Apache Derby

Procedure: Enable the Database Tools and SQL plugin

This functionality relies on the  Database Tools and SQL plugin, which  is bundled and enabled in IntelliJ IDEA   by default. If the relevant features are not available, make sure that you did not disable the plugin.

> **Note:**
> Database Tools and SQL functionality support is limited in IntelliJ IDEA without the Ultimate subscription.

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) to open settings and then select `Plugins`.

2. Open the Installed tab, find the Database Tools and SQL plugin, and select the checkbox next to the plugin name.

Procedure: Official documentation and software

* For full information about Apache Derby, refer to [the official documentation](https://db.apache.org/derby/).

* To download Apache Derby database software, refer to [the official software downloads](https://db.apache.org/derby/derby_downloads.html).

Supported DBMS version: 10.

### Before you begin

This topic presents a general procedure on how you can create a data source for the [connection](connecting-to-a-database.html) to your Apache Derby database in IntelliJ IDEA, and run a test connection. It is assumed that you already have the necessary connection details and the database is up and running .

For example, if you want to run a database on your machine and connect to that database, the corresponding DBMS software must be installed on the machine first.

To learn about your DBMS software, refer to its [official documentation](#official_information_links).

Procedure: Connect to an Apache Derby database

To connect to a database, create a data source that will store your connection details.

1. Select the data source you want to create. You can do this using one of the following ways:

* In the main menu, go to `File | New | Data Source` and select Apache Derby.

* In the Database tool window , click ![the New icon](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.general.add.svg) New on the toolbar. Navigate to Data Source and select Apache Derby.

![Create a new data source](https://resources.jetbrains.com/help/img/idea/2026.2/create_new_data_source.png)

2. In the General tab of Data Sources and Drivers dialog right pane, specify the driver and connection type.

1.

From the Driver list, select the JDBC driver for your connection.

For Apache Derby, the supported drivers are Apache Derby (Embedded) and Apache Derby (Remote).  For more information about Apache Derby databases, refer to  the official documentation: [embedded databases](https://db.apache.org/derby/papers/DerbyTut/embedded_intro.html), [remote databases](https://db.apache.org/derby/papers/DerbyTut/ns_intro.html).

2.

From the Connection type list, select the connection type depending on the connection details that you have:

Connection types for Apache Derby (Embedded)
: * Embedded: connect by using the path to the database folder.
:
: * In-Memory: connect to a temporary database stored entirely in the main memory.
:
: * URL only: connect by using only the URL.

Connection types for Apache Derby (Remote)
: * default: connect by using Host, Port, Database, and URL.
:
: * URL only: connect by using only the URL.

For the URL only [connection type](data-sources-and-drivers-dialog.html#connection_type), the JDBC URL that you enter is used as is, including the database credentials.

> **Note:**
> For the URL only connection type, the JDBC URL  is stored in plain text as is, and is also available in [IDE log file](troubleshooting-materials.html#locate-ide-log) and [data source information](managing-data-sources.html#share-data-sources-between-different-ide-instances).

For the other connection types, the JDBC URL is broken down into connection details. You can either specify them separately and use the automatically generated URL, or you can enter the URL directly in the corresponding field.

![General tab of the Data Sources and Drivers dialog](https://resources.jetbrains.com/help/img/idea/2026.2/db_connection_general_tab.png)

3. Check if there is a Download missing driver files link at the bottom of the connection settings area. Click this link to download drivers that are required to interact with a database. For a direct download link, refer to the [JetBrains JDBC drivers](https://www.jetbrains.com/datagrip/jdbc-drivers/) page.

![The Download missing driver files link](https://resources.jetbrains.com/help/img/idea/2026.2/db_connection_download_missing_drivers_link.png)

Location for the downloaded JDBC drivers is the [IntelliJ IDEA configuration directory](directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html#config-directory).

You can also use your drivers for the database instead of the provided ones. For more information about connecting to a database with your driver, refer to [Add a user driver to an existing connection](jdbc-drivers.html#configure_a_jdbc_driver_for_an_existing_data_source).

If there is no Download missing driver files link, then you already have the required drivers.

4. Specify the database connection details. Alternatively, paste the JDBC URL in the URL field.

Connection types and settings for Apache Derby (Embedded)
: default:
:
:
: 1.  Enter the path to the database file or folder in Path. Alternatively, click the Open icon (![the Open button](https://resources.jetbrains.com/help/img/idea/2026.2/app.general.ellipsis.svg)) and navigate to it.
:
: 2.
:
: From the Authentication dropdown, select the authentication method that you want to use to authenticate the connection. The following options are available:
:
:
:
: * User & Password: by using your login and password.
:
: * No auth: authentication is not required.
:
:
:
: 3.
:
: In the User and Password fields, type your user credentials.
:
:
:
: To use no password, leave the Password field empty.
:
:
:
: To delete a once entered password, right-click the Password field and select Set Empty.
:
:
:
: ![the Set Empty context menu action](https://resources.jetbrains.com/help/img/idea/2026.2/db_connection_password_set_empty.png)
:
: 4.
:
: Tick the Create Database checkbox to create a new database and connect to it.
:
:
:
: For more information, refer to the [DBMS-specific General tab reference](#reference).
:
:
:
: 5.
:
: In the URL field, IntelliJ IDEA generates the JDBC URL automatically using the values of other connection settings.
:
:
:
: If you need to use a JDBC URL with certain additional settings, paste it in the URL field. The general URL to use is as follows:
:
:
:
: * Format: `jdbc:derby:<path_to_the_file_or_folder>`
:
: * Example: `jdbc:derby:myDatabase`
:
:
:
: For more information about the URL format, refer to the [Apache Derby official documentation](https://db.apache.org/derby/docs/10.16/devguide/cdevdvlp34964.html).
:
:
:
:
:
: ![Database connection details](https://resources.jetbrains.com/help/img/idea/2026.2/db_connection_details_derby_emb_default.png)
:
: In-Memory:
:
:
: 1.  Enter the path to the database file or folder in Path. Alternatively, click the Open icon (![the Open button](https://resources.jetbrains.com/help/img/idea/2026.2/app.general.ellipsis.svg)) and navigate to it.
:
: 2.
:
: From the Authentication dropdown, select the authentication method that you want to use to authenticate the connection. The following options are available:
:
:
:
: * User & Password: by using your login and password.
:
: * No auth: authentication is not required.
:
:
:
: 3.
:
: In the User and Password fields, type your user credentials.
:
:
:
: To use no password, leave the Password field empty.
:
:
:
: To delete a once entered password, right-click the Password field and select Set Empty.
:
:
:
: ![the Set Empty context menu action](https://resources.jetbrains.com/help/img/idea/2026.2/db_connection_password_set_empty.png)
:
: 4.
:
: Tick the Create Database checkbox to create a new database and connect to it.
:
:
:
: For more information, refer to the [DBMS-specific General tab reference](#reference).
:
:
:
: 5.
:
: In the URL field, IntelliJ IDEA generates the JDBC URL automatically using the values of other connection settings.
:
:
:
: If you need to use a JDBC URL with certain additional settings, paste it in the URL field. The general URL to use is as follows:
:
:
:
: * Format: `jdbc:derby:memory:<path_to_the_file_or_folder>`
:
: * Example: `jdbc:derby:memory:myDatabase`
:
:
:
: For more information about the URL format, refer to the [Apache Derby official documentation](https://db.apache.org/derby/docs/10.16/devguide/cdevdvlp34964.html).
:
:
:
:
:
: ![Database connection details](https://resources.jetbrains.com/help/img/idea/2026.2/db_connection_details_derby_emb_inmemory.png)
:
: URL only:
:
:
: 1.
:
: From the Authentication dropdown, select the authentication method that you want to use to authenticate the connection. The following options are available:
:
:
:
: * User & Password: by using your login and password.
:
: * No auth: authentication is not required.
:
:
:
: 2.
:
: In the User and Password fields, type your user credentials.
:
:
:
: To use no password, leave the Password field empty.
:
:
:
: To delete a once entered password, right-click the Password field and select Set Empty.
:
:
:
: ![the Set Empty context menu action](https://resources.jetbrains.com/help/img/idea/2026.2/db_connection_password_set_empty.png)
:
: 3.
:
: In the URL field, IntelliJ IDEA generates the JDBC URL automatically using the values of other connection settings.
:
:
:
: If you need to use a JDBC URL with certain additional settings, paste it in the URL field.
:
:
:
: For more information about the URL format, refer to the [Apache Derby official documentation](https://db.apache.org/derby/docs/10.16/devguide/cdevdvlp34964.html).
:
:
:
: > **Warning:**
: > For  the URL only connection type, the URL field contents are stored in plain text, and are also available in the [IDE log file](troubleshooting-materials.html#locate-ide-log) and  [data source settings file](managing-data-sources.html#locate_the_datasources_xml_file).
: >
: >
: >
: > Use the designated fields  to provide your sensitive connection details  instead of putting them into the URL field.
:
:
:
:
:
: ![Database connection details](https://resources.jetbrains.com/help/img/idea/2026.2/db_connection_details_derby_emb_urlonly.png)

Connection types and settings for Apache Derby (Remote)
: default:
:
:
: 1.  In the Host field, type your server address.
:
: 2.
:
: In the Port field, type the port of Apache Derby. The default port is 1527.
:
:
:
: > **Note:**
: > Real port numbers might be different on your system. Verify that you use a correct port number with your database administrator, server settings, or hosting provider.
:
:
:
: 3.
:
: From the Authentication dropdown, select the authentication method that you want to use to authenticate the connection. The following options are available:
:
:
:
: * User & Password: by using your login and password.
:
: * No auth: authentication is not required.
:
:
:
: 4.
:
: In the User and Password fields, type your user credentials.
:
:
:
: To use no password, leave the Password field empty.
:
:
:
: To delete a once entered password, right-click the Password field and select Set Empty.
:
:
:
: ![the Set Empty context menu action](https://resources.jetbrains.com/help/img/idea/2026.2/db_connection_password_set_empty.png)
:
: 5.   In the Database field, type the database name to which you want to connect.
:
: 6.
:
: In the URL field, IntelliJ IDEA generates the JDBC URL automatically using the values of other connection settings.
:
:
:
: If you need to use a JDBC URL with certain additional settings, paste it in the URL field. The general URL to use is as follows:
:
:
:
: * Format: `jdbc:derby://<host_address>:<port_number>/<database_name>`
:
: * Example: `jdbc:derby://127.0.0.1:1527/myDatabase`
:
:
:
:
:
: ![Database connection details](https://resources.jetbrains.com/help/img/idea/2026.2/db_connection_details_derby_rem_default.png)
:
: URL only:
:
:
: 1.
:
: From the Authentication dropdown, select the authentication method that you want to use to authenticate the connection. The following options are available:
:
:
:
: * User & Password: by using your login and password.
:
: * No auth: authentication is not required.
:
:
:
: 2.
:
: In the User and Password fields, type your user credentials.
:
:
:
: To use no password, leave the Password field empty.
:
:
:
: To delete a once entered password, right-click the Password field and select Set Empty.
:
:
:
: ![the Set Empty context menu action](https://resources.jetbrains.com/help/img/idea/2026.2/db_connection_password_set_empty.png)
:
: 3.
:
: In the URL field, IntelliJ IDEA generates the JDBC URL automatically using the values of other connection settings.
:
:
:
: If you need to use a JDBC URL with certain additional settings, paste it in the URL field. The general URL to use is as follows:
:
:
:
: * Format: `jdbc:derby://<host_address>:<port_number>/<database_name>`
:
: * Example: `jdbc:derby://127.0.0.1:1527/myDatabase`
:
:
:
: > **Warning:**
: > For  the URL only connection type, the URL field contents are stored in plain text, and are also available in the [IDE log file](troubleshooting-materials.html#locate-ide-log) and  [data source settings file](managing-data-sources.html#locate_the_datasources_xml_file).
: >
: >
: >
: > Use the designated fields  to provide your sensitive connection details  instead of putting them into the URL field.
:
:
:
:
:
: ![Database connection details](https://resources.jetbrains.com/help/img/idea/2026.2/db_connection_details_derby_rem_urlonly.png)

For the reference information about connection settings and properties  on the General and other tabs of   Data Sources and Drivers  dialog (  `Shift+Enter` (Windows), `⌘ I` (macOS), `⇧ ⏎` (IntelliJ IDEA Classic (macOS)), `⌘ I` (macOS System Shortcuts), `Shift+Enter` (XWin), `Shift+Enter` (GNOME), `Shift+Enter` (KDE), `Shift+Enter` (Emacs), `Shift+Enter` (Sublime Text), `⌘ I` (Sublime Text (macOS)), `Shift+Enter` (NetBeans), `Shift+Enter` (Visual Studio), `⌘ I` (Visual Studio (macOS)), `Shift+Enter` (Eclipse), `⌘ I` (Eclipse (macOS)) ) , see [Connection settings and DBMS-specific properties](#reference) .

5. Ensure that the database connection can be established using the provided details. To do this, click the Test Connection  link at the bottom of the connection details section.

![Test Connection link](https://resources.jetbrains.com/help/img/idea/2026.2/db_test_connection_link.png)

If you encounter any connection issues, refer to the [Cannot connect to a database](connectivity-problems.html) page.

6. (Optional) By default, only the default    schema is   introspected and available to work with. If you also want to work with other     schemas  , in the Schemas tab, select them for the introspection.

![Schemas tab of the Data Sources and Drivers dialog](https://resources.jetbrains.com/help/img/idea/2026.2/db_connection_schemas_tab.png)

7. Click OK to create the data source.

8. Find your new data source in the    Database   tool window   .

* For more information about the Database tool window , see the corresponding [reference topic](database-tool-window.html). > **Tip:** > To see more schemas under your new data source node, click the N of M button and select the ones you need. IntelliJ IDEA will introspect and show them. > > > > ![Select databases and schemas to introspect and display in the Database tool window](https://resources.jetbrains.com/help/img/idea/2026.2/connection_flow_show_databases_and_schemas.png)

* For more information about working with database objects in IntelliJ IDEA, refer to [Database objects](database-objects.html).

* To write and run queries, open the default [query console](query-consoles.html) by clicking the data source and pressing `F4` (Windows), `⌘ ↓` (macOS), `F4` (IntelliJ IDEA Classic (macOS)), `F4` (macOS System Shortcuts), `F4` (XWin), `F4` (GNOME), `F4` (KDE), `F4` (Emacs), `F4` (Sublime Text), `F4` (Sublime Text (macOS)), `F4` (NetBeans), `F4` (Visual Studio), `⌘ ↓` (Visual Studio (macOS)), `F12` (Eclipse), `F3` (Eclipse (macOS)).

* To view and edit data of a database object, open [Data editor and viewer](data-editor-and-viewer.html) by double-clicking the object.

## Connection settings and DBMS-specific properties

### Connection settings

For the reference information about  connection settings (for example, Host, Port, and so on) on the General and other tabs of   Data Sources and Drivers  dialog (  `Shift+Enter` (Windows), `⌘ I` (macOS), `⇧ ⏎` (IntelliJ IDEA Classic (macOS)), `⌘ I` (macOS System Shortcuts), `Shift+Enter` (XWin), `Shift+Enter` (GNOME), `Shift+Enter` (KDE), `Shift+Enter` (Emacs), `Shift+Enter` (Sublime Text), `⌘ I` (Sublime Text (macOS)), `Shift+Enter` (NetBeans), `Shift+Enter` (Visual Studio), `⌘ I` (Visual Studio (macOS)), `Shift+Enter` (Eclipse), `⌘ I` (Eclipse (macOS)) ) , see  [Data Sources](data-sources-and-drivers-dialog.html#db).

### DBMS-specific properties

#### General tab

| Item | Description | Connection type |
| --- | --- | --- |
| Path | The path to the database file or folder.   |    Driver: Apache Derby (Embedded)     Connection type: default, In-Memory    |
| Create Database | Adds an argument to the URL to create a database.   |

## See also

### Reference

[Data sources and their elements](database-tool-window.html#icons-for-data-sources-and-their-elements) [Data Sources and Drivers dialog](data-sources-and-drivers-dialog.html)

### Tool Windows

[Database tool window](database-tool-window.html)

