db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blasby <dbla...@gmail.com>
Subject Custom types / "long" datatypes in custom functions
Date Tue, 22 Feb 2005 01:01:54 GMT
I released a spatial datablade for derby a few weeks ago.  There were
some fundamental problems that I mentioned when I first messaged this

1.  Custom Types
     It would be a great to be able to store arbitrary java Objects in
the database - and Derby would handle the
serialization/deserialization.  I was thinking something like:

CREATE TYPE Geometry AS "com.vividsolutions.jts.geom.Geometry";
then being able to do things like:
CREATE TABLE mytable (g Geometry, description VARCHAR(100));

Alternately, just being able to "tag" a BLOB with a type name would
enough. Something like:

2.   Functions
   Currently, functions cannot send/return non-fixed-length data
types.  It would be great to be able to either (1) send custom types
to custom functions OR (2) send BLOB-like things to custom functions.
(oh, are BLOBs inefficient to use?)

Currently, I use a "VARCHAR(1000000)" as my Geometry type, and stick a
base-64 encoding of the binary version of the Geometry inside.  This
is pretty messy and inefficient.  Not to mention the fact that you can
run spatial functions on text like 'how now brown cow'.

Is there anything planned to address issues of these types?

ps. more information on the Spatial DB in a Box here (see
"Derby/Cloudbase bindings"):

View raw message