News of the Libgda front

Been a long time without any post… here are some fresh news about Libgda.

Now that the API has been declared stable for the next V4, I’ve started to update the information regarding Libgda at http://www.gnome-db/org. There is now a new description of what Libgda is:

  • a wrapper like ODBC but with more features to access several database engines
  • a meta data extractor (to know all about database objects in a common way)
  • comes with an SQL console application (like mysql, psql or sqlite3 consoles)
  • relies on GLib, coded in C, its API is easy to use
  • at the moment supports SQLite, MySQL, PostgreSQL, MSAccess and Bdb, work is in progress for other database types (such as Firebird and Oracle) and to wrap ODBC and JDBC for more wider usage
  • LGPL license

I’ve been working lately on a JDBC (JAVA’s own mostly standardized way to access a database) wrapper for Libgda; that code has just been committed to subversion. Even though it’s still not finished, it is already quite useable: you can write a C or C++ application which accesses data through JDBC. I’ve been testing it with the H2 and HSQLDB database engines (which are written entirely in JAVA, HSQLDB being the ‘default’ database engine used by OOo’s Base component).

Here is how it works: the JDBC wrapper (which is a shared library like for other Libgda’s databases’ wrappers) loads a Java Virtual Machine (JVM, which is also a shared library) which itself loads the JDBC drivers, opens connections, run queries,… The communication between the C and JAVA parts is done through the Java Native Interface (JNI). I’m testing this on Linux (both 32 and 64 bits) and Windows XP with Sun’s JRE or JDK.

For example on my test machine, the sql console tool reports the following database providers (drivers):

Provider                               | Description
PostgreSQL                             | Provider for PostgreSQL databases
MSAccess                               | Provider for Microsoft Access files
MySQL                                  | Provider for MySQL databases
Berkeley-DB                            | Provider for Berkeley databases
org.hsqldb.jdbcDriver                  | Provider to access databases using JDBC's org.hsqldb.jdbcDriver driver
com.mysql.jdbc.Driver                  | Provider to access MySQL databases using JDBC
org.h2.Driver                          | Provider to access databases using JDBC's org.h2.Driver driver
org.postgresql.Driver                  | Provider to access PostgreSQL databases using JDBC
org.apache.derby.jdbc.AutoloadedDriver | Provider to access databases using JDBC's org.apache.derby.jdbc.AutoloadedDriver driver
org.apache.derby.jdbc.ClientDriver     | Provider to access databases using JDBC's org.apache.derby.jdbc.ClientDriver driver
SQLite                                 | Provider for SQLite databases

There is still some work to be done on the meta data front as each JDBC driver tends to introduce some particularities about this which makes it almost impossible to retreive meta data in a database agnostic way…

Last but not least I’ve proposed a patch to the Gnumeric people to update the Libgda plugin which allows one to insert into a spreadsheet the results of a SELECT query run through Libgda.

Comments are closed.