Re: VisAD and SQL databases

Hi Bill,

Bill Hibbard wrote:

Someone could create a fairly general VisAD interface to
SQL by an implementation of the Form interface. The Open()
method signatures of Form take a file name and a URL name.
These are Strings and can be interpreted however the
implementation likes.

For a basic SQL interface, the name would probably refer
to a single table, and would return a Field with MathType
of the form:

 (record_index -> (domain1, domain2, ..., domain_last))

Where domain1, domain2, ..., domain_last are the numerical
and text domains in the table. If all the domains are
numerical, the Field can be a FlatField. Otherwise it
must be a FieldImpl. An SQL interface may offer the option
of excluding the text domains, in order to force a FlatField
(much more efficient than a FieldImpl).
How are you going to pass the information about which table is numerical and which is textual?

For our app, we had

( x -> y) (FlatField, which represents a time series, i.e. a simple 2D plot)

whereas you're suggesting

( record_index -> (x,y))

which when mapped
x -> XAxis
and
y -> YAxis

is depicted as 2d scatter plot. (Am I right?)

So I'm still with my approach (though I might take back my "it is impossible to write an adapter which will work with every JDBC-capable database" without adding at least "which will give you the data depiction you want" ;-)

Cheers,

Ugo

The mapping to displays would be specified by a set of
ScalarMaps of domains to DisplayRealTypes.

If domains split into independent and dependent variables,
then the application would need to rearrange the MathType
to get something like:

 ((domain1, domain2) -> (domain3, ..., domainN))

with an appropriate domain Set. This is like what Donna has
done, constructing an Irregular2DSet.

A SQL interface could also return a database of multiple
tables as a Tuple of Fields, one per table.

Justin and Donna, if one of you or anyone creates such a
SQL interface, we would love to add it to VisAD, or add a
link to the VisAD web page. Note for any Form method
signatures you don't want to implement, just have them
throw a visad.UnimplementedException.

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html