On Fri, 18 Sep 1998, David Warnock wrote:

> There are a large number of commercial products available to map java
> objects into relatonal databases (I use one called VBSF for some
> commercial products).
> 
> But are there any Open Source tools to do this? I am interested in
> contributing to such a project as I need it for several open source
> projects I have planned.

I added this functionality into the PostgreSQL JDBC driver recently for
the next release (6.4 due out Oct 1st, currently in beta).

It works if a java object is Serializable, and it's full class name
matches the name of a table.

ie: mypackage.myclass would map to the table mypackage_myclass.

Then when the ResultSet.getObject() or PreparedStatement.setObject()
methods are called, the driver uses the Reflection API to do the transfer. 

It works quite well. The only limitations are that the class/table names
are limited to 31 characters, and the 8k tuple limit (although this should
be extensible in 6.4 at database creation time).

I've just got to find the time between now and the end of the month to
finish off the example code and the documentation :-(

I wrote this extension because I kept seeing questions on how to perform
queries on large objects within the database.

I hope that helps.

Peter

PostgreSQL:     http://www.postgresql.org
  JDBC FAQ:     http://www.retep.org.uk/postgres/

-- 
       Peter T Mount [EMAIL PROTECTED]
      Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
 Java PDF Generator: http://www.retep.org.uk/pdf

Reply via email to