[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [stellation-res] Decision on Oracle backend needed!
|
----- Original Message -----
From: "Ringo De Smet" <ringods@xxxxxxxxxxx>
To: <stellation-res@xxxxxxxxxxxxxxx>
Sent: Wednesday, October 02, 2002 8:25 AM
Subject: RE: [stellation-res] Decision on Oracle backend needed!
> --- Jonathan Gossage <jgossage@xxxxxxxx> wrote:
> > NULL values for empty comments and text lines are easy to recognize.
> > When you call the JDBC function "getString" on the item in the result
> > set, a null is returned. This is easy to recognize and turn into an
> > empty string. This means that we can leave the existing code that
> > writes to the database alone.
>
> What I dislike about this is that you will have to test on 'null'. I
> think that putting 'NOT NULL' on the database is there to get rid of
> such 'is null' tests.
>
> > For an empty string on Oracle we will get a null returned, an empty
> > string for any other database. Either way we can inrerpret this as an
> > empty string.
>
> Still, the database constraints need to be weakened to allow 'NULL'.
> Since the createRepository is now outside of a particular DB backend
> implementation, this weakening is done on all databases if you would
> change it there.
>
> Ringo
>
You should be able to do it so that Oracle is the only database where
allowing NULL is declared in the schema. The test for null return could also
be hidden in Oracle specific code. What you could do is provide a cover
function for the two getString() methods and implement an Oracle specific
version in the OracleDatabase class.
Regards
Jonathan
Personal Email
jgossage@xxxxxxxx
Business Email
jonathan@xxxxxxxxxxxxxx