JDBC, which stands for Java Database Connectivity, is a Java API that allows Java applications to interact with relational databases. There are JDBC drivers for most of the common databases, but Vortex comes with the most common built in. I’ve written several posts about using sqlite so I thought it might be useful to first explore connecting Vortex to the ChEMBL sqlite database I created previously.

Connecting to database

First we need to define the connection to the database, from the Vortex menu bar select “Open Connection Editor” from the “File” menu.

The connection string needs to added, this is jdbc:sqlite: followed by the full path to the sqlite database, you can also added a description. It should look something like this.

Save this file. Opening a database should now establish the connection to the chembldb.sqlite database. The Database connections window now allows exploration of the database, to see the tables, and the columns.

If we select columns from the chembl table (not mol because this is a binary object) and then click OK all 2.47 million structures will be imported into Vortex

Alternatively you can run a SQL to import a selected number of records or columns.

The results will be added to a new Vortex workspace.

Similarly searching for a list of identifiers

Returns

With a more complex databases and a knowledge of SQL it is possible to pull selected subsets of data into Vortex for more detailed analysis.

Related Posts