Re: VisAD and SQL databases

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).

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.

Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738

  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: