In association with heise online

20 December 2011, 15:00

JDBC driver for Neo4J bridges the SQL/NoSQL divide

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

Neo4j logo NoSQL databases such as the graph database Neo4j don't normally work with common database tools which are typically tailored for SQL databases. Rickard Öberg, a developer from Neo Technology, thought this wasn't right, and now in a blog posting he has described a JDBC interface he has created which forwards database queries to Neo4j and allows common applications to access the NoSQL database without modification.

Öberg's approach is to use the REST API of Neo4j and its Cypher query language. The results of Cypher queries are iterable maps which can be converted into a JDBC ResultSet. A thin JDBC API implementation delegates requests to the REST API and Cypher query engine. For table and column information, Öberg created a graph which described the metadata through "type nodes".

The system was then capable of responding to Cypher queries sent over JDBC, but most database tools send a "SELECT * FROM table WHERE query" style query. To make those tools work, he added a "quirks mode" which converts common SQL statements to Cypher equivelants. This allowed him to get DbVisualiser, LibreOffice, the ODBC-JDBC gateway and IntelliJ working with the Neo4j database.

The project is currently a "first attempt". It can only perform read queries, only works with Neo4j and its use of the REST API would be inefficient for a heavy user. However, Öberg thinks that the potential for connecting NoSQL databases to SQL tools is great and has made the code available to download from his github repository where developers can find further instructions for the GPL licensed code.

(djwm)

Print Version | Send by email | Permalink: http://h-online.com/-1398821
 


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit