Embedded JDBC Reference
This document provides the information you need to know to start using Sclera's embedded JDBC driver. The Sclera JDBC driver provides a standard API to manage and analyze your data from within a Java (more generally, JVM) application.
This document is not a tutorial on how to use JDBC. JDBC is a Java standard; to get started on the basics, please refer to the the excellent tutorials and references provided by Oracle and PostgreSQL. Also, the Wikipedia entry on JDBC gives a quick overview.
The JDBC driver is accessed through the URL
The driver is compatible with JDBC type 4, in the sense that it is pure Java and is platform independent.
For an example application, please see the discussion in the installation document. The code is available on GitHub, both in Java and Scala:
The JDBC driver accepts all SQL statements supported by Sclera.
The queries return
ResultSet objects, as required by the standard. However, the non-query statements (
DELETE), which may be required by the standard to return the number of rows inserted or updated, may not return the correct number; this is because the underlying sources with non-SQL/JDBC interfaces (such as NoSQL datastores) may not return the required information.
The JDBC support is partial (for instance, functions related to transaction processing and cursors are not supported, and only forward scans of resultsets are permitted). However, the supported API should suffice for most analytics applications, and for interfacing with most JDBC-compliant BI tools.
A complete list of limitations will be posted here soon.
Connecting Sclera with your Existing Applications and Reporting Tools◄
The JDBC support also enables your existing applications and reporting tools to work with Sclera.
You need to set the classpath to make Sclera visible to the application. Note that Sclera's SQL is largely compatible with PostgreSQL, so you can mention PostgreSQL when asked, but actually use Sclera's JDBC driver.
Some applications and reporting tools can only accept (or generate) standard SQL. Such tools do not accept the SQL extensions needed to perform advanced analytics within your queries. To use such extensions, you need to define views within Sclera to perform the required analytics, and then have the application or reporting tool use these views in its queries.
The exact directions depend upon the specific application that you want to link. If you face a problem in linking your application to Sclera, please let us know by sending an email to email@example.com.