[JDBC Datasource]: Steps to Create a JDBC Datasource

Java Database Connectivity (JDBC) is a standard SQL database access interface, providing uniform access to a wide range of relational databases. JDBC also provides a common base on which higher-level tools and interfaces can be built.

Before creating a JDBC datasource

JDBC driver must be placed in /ext directory of the product before launching of Elixir software.

Creating a JDBC datasource

To integrate our software Repertoire Designer/Server with a database, we will firstly require a JDBC or ODBC driver. JDBC connection will be recommended as the ODBC connection requires a JDBC/ODBC bridge. Using the common Sun JDBC/ODBC bridge is also not advisable as it is meant for experimental purposes and there are many known implications too. Therefore, for all database connections, it will be recommended to download the latest & correct JDBC driver meant for its specific database and version.

There are many known 3rd party vendors that also provide JDBC drivers for certain databases. In terms of performance, it will be best if you can verify further on your end as many factors on your environment are taken into consideration - JDBC driver’s vendor & version, Operating System (OS), JVM version & hardware.

The following shows the procedures to establish a JDBC connection using a JDBC Datasource -

  1. Deploy the JDBC drivers into your RepertoireDesigner/ext or RepertoireServer/ext folder. This driver is required to be loaded on startup.
  2. You will need to add a JDBC Datasource using the wizard.
  3. If the JDBC driver for your database is correctly deployed, you should see the driver checked with a “Green” Box, instead of “Red”.
  4. The correct database details - Driver, URL, Username & Password (*depending on if you have defined one on your database) are required.
  5. Next, you can further define the SQL query in the wizard or use the Query Builder.
  6. An important step to remember - Infer Schema is required before finishing the wizard. This defines the database’s schema correctly in the JDBC Datasource. Any changes to the SQL Query requires a Re-Infer of the Schema.

Attached is a PowerPoint that shows the steps to deploy the JDBC Datasource to connect to a database.