db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject AW: BLOB and CLOB Torque datatypes
Date Tue, 10 May 2005 15:33:27 GMT




Hi,

Fabio Insaccanebbia <finsaccanebbia@gmail.com> schrieb am 09.05.2005
18:40:47:

> Hi Jörg,
>
> >Particularly the Oracle JDBC drivers used to give a lot of problems
> when trying to use BLOBs.
> >
> yes, that's true.. however the last driver version (10g) seems to have
> solved a couple of problems with BLOBs..
> The choice of "avoiding" BLOBS in an application is probably a good one:
> Torque, on the other side, should try
> to "solve" or "reduce" the problems with BLOB using so that the
> application developers can choose to use BLOBs
> without too many issues.

Here, I agree with Fabio. In my opinion, what the user wants is to store a
byte array or a large string in a database, and then looks for a data type
which does this. The user will maybe decide to use a clob and a blob for
this. This may limit the user to certain databases, but maybe this might
not be an issue in his case. Or maybe the user decides to go for maximum
portability, in which case he will use some other data type. But I do not
think that limiting Torque to the subset of features supported by all
databases is a good idea.

>
> >With regard to mapping, there is another problem with date, datetime and
> >timestamp, particularly with newer versions of MySQL which have a very
> >peculiar handling of these types. Even though there is no DATETIME data
type
> >in the JDBC interface we may have to provide the possibility to define
such
> >in the schema.xml file, since some DBMS use it and clearly distinguish
> >between timestamp, date, and datetime.
> >
> The JDBC interface is probably a bit clumsy... the setTimestamp seems
> the only way to set both Date and Time in the same field.
> I'm afraid that some driver creators decided to "overcome" this JDBC
> limit by ignoring the setDate specified behaviour.
>
> I agree with the DATETIME proposal: this could give us the flexibility
> to work around driver's strange behaviours.

Could you please elaborate a bit more on this ? I do not have a SQL
specification ready, so I list what I guess. Please correct me if I'm
wrong.
The SQL Date type is supposed to hold dates with day accuracy.
The SQL Time type is supposed to hold time information with second
accuracy. It should not hold any Date information.
The SQL Timestamp type is supposed to hold Date+Time with at least
millisecond accuracy.

So I guess that the datetime type should hold date+time information with
second accuracy (like the date type in oracle).
Do you want to implement this for all databases ? This would probably mean
that for some databases, you would have to use the timestamp type and limit
its accuracy. But then, defining a date with day accuracy on oracle also
needs limiting the accuracy to dates.

I am not sure whether this can be implemented with village....

      Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message