[tmql-wg] Result set requirements

Lars Marius Garshol larsga@ontopia.net
Mon, 01 Mar 2004 19:26:35 +0100

* Rani Pinchuk
| Take for example an application that generate HTMLs from SQL
| queries.  I would like to separate the generation of the SQL from
| the rest of the program so the relational database expert can
| create, profile and maintain those queries without touching the rest
| of the application.

I'm not sure how much sense that makes. How can the expert know what
to do about the queries without seeing them in context? I don't think
tuning pieces of an application in isolation is at all easier than
doing it when seeing the pieces in context.

The other part of this is that if the query engine has everything
available to it, that is, both the queries and the logic used to
generate output, it has a much better basis for doing the tuning
itself. If you look at the source code of SAXON, for example, it
already passes this type of hints from the XSLT to the XPath engine in
order to speed things up.

| The programmer who program in certain environment, should not take
| into account the SQL when making calculations over the queries
| results.  The graphics person should create/maintain the
| presentation (so the HTMLs) without the need to go into the SQL or
| the rest of the code...  Well, this is the vision I find the best
| (see [1] and [2] for how it can be done).

I don't know, Rani. I worked on a relatively big server framework that
used this approach, and which had a lot of queries. The result was a
very, very ugly architecture with almost no proper OO in it. I've also
seen it done much better, and there are arguments for keeping the web
designers innocent, but I'm skeptical in general. 

I think you raise some valid concerns, but I worry that perhaps your
solutions to them are a bit too radical.

| What I am afraid of is that the moment we incorporate the
| presentation of the results within the TMQL we practically mix the
| three roles described above, and for sure mix TMQL with XML or HTML.

Some approaches to this certainly do, though I'm not sure all of them

Lars Marius Garshol, Ontopian         <URL: http://www.ontopia.net >
GSM: +47 98 21 55 50                  <URL: http://www.garshol.priv.no >