Bayless Kirtley wrote:
I have a project that currently uses the McKoi open source data base. I am interested in converting it to Derby because of the larger user base. Before doing so, I would like to estimate the rewrite effort involved. To that end, I have to main questions. 1. McKoi supports a Boolean data type which I have used extensively. Does Derby have an equivalent or something easily substituted?

There in the past has been an effort to add Boolean, but currently it is not supported. Others can respond here, but I would substitute an integer column using 1 and 0 for true and false.

2. McKoi also supports Java Objects. What data type would I need to use in Derby? If the answer is CLOB then will I have to convert both ways to save and retrieve?


Derby does not currently support native storage of Java objects. You would need to convert in both ways.

But I actually recommend that rather than doing that, especially since you're not a SQL expert, that you should look at the new Object/Relational engines out there, most of which support Derby

Implementations of the Java standard JSR 220 (my recommendation, this appears to be the way the wind is blowing in this space):
   * OpenJPA (http://incubator.apache.org/openjpa/)
* Glassfish (https://glassfish.dev.java.net/javaee5/persistence/persistence-example.html), * Hibernate (http://www.hibernate.org/) - use the Java SE 5 implementation, which uses JSR220, so you don't get locked in...

JDO implementations (JDO is another O/R Java standard):
   * JDO Reference Implementation (http://db.apache.org/jdo/)
   * JPOX (http://www.jpox.org/index.jsp)

Other non-standard O/R solutions
   * Cayenne (http://incubator.apache.org/cayenne/)
   * OJB (http://db.apache.org/ojb/)
   * Torque (http://db.apache.org/torque/)

With one of these babies, you won't need to do SQL ever again...

David

I am fairly competent in SQL but by no means a real expert. I am using J2SE and ResultSet to communicate with the data base via JDBC. Thanks,
Bayless

Reply via email to