JDBC Repository

A JDBC Universe allows data to be read from a relational database using a JDBC driver. If your data is defined in a relational database, and a JDBC driver is available, then JDBC Universe is recommended. Before getting started, add the JDBC driver into /opt/elixir/lib/, to make it available to all Java Virtual Machines.

Double click a JDBC universe from the folder tree to open it in the Universe Designer.

The Universe Designer displays as shown in Figure 5.16, “Universe Designer for a JDBC Universe”:

Figure 5.16. Universe Designer for a JDBC Universe

Universe Designer for a JDBC Universe

Configuring a Connection Pool

JDBC allows access to data through SQL statements. To configure the connection pool, click the icon. For example, you can install MySQL Workbench and use com.mysql.jdbc.Driver for the JDBC Universe. Modify the host and database name in the URL field, enter the user name and password, and click Test Connection.

Figure 5.17. Configuring the Connection Pool

Configuring the Connection Pool

If the connection test succeeds, you have the option to define the Connection Pool Parameters on the next page. On the Connection Pool JDBC Properties page, you can set any customized properties for your JDBC driver by setting the keys and values. After you complete the settings, click Finish.

Adding Tables

Click the Add Tables icon. Tables from the relational datasource will display in the Add Tables window. You can choose from these tables, or invert your selection. Click OK.

The tables are joined automatically. You can create custom tables by using expressions.

Pasting Tables

Click the Paste icon to copy tables from another JDBC Universe and paste them here.

Viewing SQL

Click the SQL tab. This displays the SQL that will be executed for the table. Click the Load Data () icon to load the table contents.

Other Actions

All other actions that you can perform on a JDBC Universe are the same as in the section called “Repository Universe”