[tmql-wg] Result set requirements

Dmitry dmitryv@cogeco.ca
Sat, 21 Feb 2004 14:33:10 -0500


----- Original Message ----- 
From: "Robert Barta"

> In AsTMa? we do not allow to "generate arbitrary text". We only allow
>
>   - lists
>   - XML as an internal representation, and
>   - TM data (again in internal representation)
>
> The only way to get text directly is to have it as part of the list.
>
> I still think that these 3 formats (at least the first two) are widely
> used and allow for flexible postprocessing. The inclusion of a "TM
> Data Type" simply is added for symmetry.
>
> The application designer will choose what structure suits the results
> best.

I think that it is important to have part of TMQL responsible for
generating results in formats which Robert described in his email.
It helps to minimize data model mismatch when we move results between topic
map engine(s) and external systems.

Let's say that we  limit ourselves with tables as TMQL result set.  We have
TMDM on the topic map engine side.
And we have something like TMAPI-based program on external system side. If
we have only tables as result set  we have to
deconstruct rich TM structures into tuple streams and construct again
object-oriented structures on the client side.

If we support XML as a result set we can have very smooth transformations
between data models, for example:

TMDM - TMQL -> XML (with any vocabulary)
XML - XQuery,XSLT -> XML
XML - XSLT ->  HTML

All these transformations are very natural and simple.

If we support TM data as a result set we can move TM data between systems /
layers whithout deconstructing/constracting  TM data structures.
For example:

server TMDM - TMQL  -> client TMDM
client TMDM -> - GUI binding + TMQL UPDATE -> client TMDM
client TMDM  -> - TMQL UPDATE -> server TMDM

When we do GUI binding we can transform client TMDM into lists or XML, for
example.
Again, we have very natural transformations.

I believe that in future, programming languages will have native support for
XML (more precisely XML-like data models).  XML APIs will be transformed
into language rich data models and syntax. If we have XML and TM data as
result sets we can have efficient and easy to use environment for building
TM-based systems. Otherwise we ask programmers to spend time on bridging
gaps between different data models.

Dmitry