Thread: PostgreSQL JDBC vs jxDBCon as a model for other language implementations
Hi. I'm building an API for database access for a non-Java language. I'm modeling the API very closely on JDBC. I want to make it as easy as possible for other developers to implement drivers for different database systems. I came across the jxDBCon project (http://jxdbcon.sourceforge.net/) which seems to be a good model: "jxDBCon a framework to ease the development JDBC drivers. By using it you can concentrate on the tasks specific to your DBMS and benefit from the generic solutions provided by jxDBCon. jxDBCon also contains a featureful driver implementation for PostgreSQL" They also say: "Actually the framework was created for the PostgreSQL driver, as I was disappointed with the compatibility of the existing driver which ships with the database distribution" The last commit to jxDBCon was almost 5 years ago, whereas the PostgreSQL JDBC seems well maintained. The PostgreSQL JDBC drivers seems to have a good Abstract* class hierarchy, which is what I'm looking for. There does seem to be some PostgreSQL-specific logic in those abstract classes though, like appendArray in AbstractJdbc4Connection. I'm wondering how the jxDBCon and PostgreSQL JDBC drivers compare. I'd appreciate it if someone could give me some background information about their history and the relationship between the two drivers. Is the PostgreSQL JDBC driver class hierarchy, and implementations of the abstract classes, a good foundation to build a framework to ease the development JDBC drivers for multiple databases? Tim.
Re: PostgreSQL JDBC vs jxDBCon as a model for other language implementations
From
Achilleas Mantzios
Date:
Στις Thursday 22 July 2010 11:54:02 ο/η Tim Bunce έγραψε: > > They also say: > > "Actually the framework was created for the PostgreSQL driver, as I > was disappointed with the compatibility of the existing driver which > ships with the database distribution" Then he should rather contribute to the official jdbc driver, than create another zombie open source project. -- Achilleas Mantzios
On Thu, 22 Jul 2010, Tim Bunce wrote: > The PostgreSQL JDBC drivers seems to have a good Abstract* class > hierarchy, which is what I'm looking for. There does seem to be > some PostgreSQL-specific logic in those abstract classes though, > like appendArray in AbstractJdbc4Connection. The AbstractJdbc classes are not designed with the intention of being usable by other database driver implementations and are very postgresql specific. They are instead designed to be able to share code across the various JDBC driver versions that can be compiled. When you build the driver you get a version that matches the JDBC spec of your JDK. So over the course of history we've offered JDBC 1 -> JDBC 4 spec drivers and that's what the AbstractJdbc classes facilitate. Kris Jurka
On Fri, Jul 23, 2010 at 02:08:33PM -0400, Kris Jurka wrote: > On Thu, 22 Jul 2010, Tim Bunce wrote: > > >The PostgreSQL JDBC drivers seems to have a good Abstract* class > >hierarchy, which is what I'm looking for. There does seem to be > >some PostgreSQL-specific logic in those abstract classes though, > >like appendArray in AbstractJdbc4Connection. > > The AbstractJdbc classes are not designed with the intention of > being usable by other database driver implementations and are very > postgresql specific. They are instead designed to be able to share > code across the various JDBC driver versions that can be compiled. > When you build the driver you get a version that matches the JDBC > spec of your JDK. So over the course of history we've offered JDBC > 1 -> JDBC 4 spec drivers and that's what the AbstractJdbc classes > facilitate. Thanks for that helpful background Kris. Given that design it seems that jxDBCon might be a better model for my needs. I'm trying to contact the authors to get some information on the history and status of the project. (It seems to have been abandoned some years ago.) Meanwhile, I'd be delighted if anyone could suggest any other JDBC driver development framework I could learn from. Or, else any other open source JDBC driver with a good internal architecture. Thanks! Tim.