Derby Data Source
This article includes information about how to install the JavaDB/Apache Derby JDBC driver and how to connect to a Derby database. With the JDBC driver installed, the JavaDB/Apache Derby data source is available as an option in the connection wizard when creating an API.
This article includes information about how to install the JavaDB/Apache Derby JDBC driver and how to connect to a Derby database. With the JDBC driver installed, the
JavaDB/Apache Derbydata source is available as an option in the connection wizard when creating an API.
In this article:
Install the JavaDB/Apache Derby JDBC Driver
The self-contained, single-user version of
CA Live API Creatorthat is based on Jetty includes the JavaDB/Apache Derby JDBC driver. The JDBC driver is located in the
%JETTY_HOME%/caliveapicreator/lib/extdirectory. If you have installed this version of
CA Live API Creator, no additional steps are required to install the JDBC driver.
If you have installed
CA Live API Creatoron another Java container, such as Tomcat, copy the
derby-<version>.jarJAR file (the JDBC driver) into the directory that is based on the Java container on which you have installed
CA Live API Creator:
Copy the JDBC driver into the
Copy the JDBC driver to the
<Your WebLogic Domain Directory>/libdirectory.
Add the JDBC driver to your Web application server.
Using the WebSphere administrative console, create a JDBC provider for the driver in the server.
For more information about how to create a JDBC provider, see the IBM WebSphere documentation.
For more information about the JDBC driver versions that
CA Live API Creatorsupports, see Installation Requirements and Supported Platforms.
Connect to a Derby Database
You can connect to your Derby database using the following methods:
- (If you have not created your API yet) When you create your API.For more information about how to create an API, see Creating APIs.
- (If you have an existing API) By adding a connection to a Derby data source.For more information about how to add a connection to a data source, see Database Connectivity.
The following procedure details how to connect to your Derby database when creating your API.
Follow these steps:
- In API Creator, on the APIs page, clickCreate New API.
- The connection wizard opens.
- ClickDatabase Firstas the approach that you want to use to create your API.
- SelectDerby/JavaDBas the data source.
- Complete the following fields, and then clickContinue:URLEnter the folder location. For example:jdbc:derby:directory:/Users/jdoe/lac/api-projects/Market/MarketDB;create=trueSchemaEnter the name of the schema.UsernameEnter the username used to connect to the schemaPasswordEnter the password for the username used to connect to the schema.
The API is created. You are connected to the Derby database.
If you have added a managed data server and a data source for a managed database to your data server, you can manage tables, fields, and relationships in the data source. If you have selected Apache Derby as the type of database to use for your managed data server,
CA Live API Creatorcreates your schemas under an install folder (such as
Managed Databases). Having your schemas saved in this install folder can make it hard for you to extract a particular schema and send to colleagues. Instead, you can export your API and share the Derby database files. The recipient can import the API and adjust the data source to the restored Derby database location.
For more information:
Now that you have connected to your Derby database, you can do the following:
- Allow users with the appropriate credentials to edit the schema for this database.For more information about how to allow users to edit the schema for databases, see Database Connectivity.
- Create your schema.You can create your schema using one of the following methods:
- Using API Creator
- By way of managed data REST endpoint requests
- Using Data Explorer.For more information:
- About how to create your schema using API Creator, see Manage Existing Schemas.
- About how to create your schema using managed data REST endpoint requests, see System REST Endpoints.
- About how to create your schema using Data Explorer, see Manage Tables in Managed Databases.