next up previous
Next: SQL-Support Up: Converting SQL to HTTP-Requests Previous: Converting SQL to HTTP-Requests

Approach

The HTML forms can handle only simple key based search queries. They can only help searching for the occurrences of a specified substring in the author/title list. Neither multiple strings nor logical connectors between forms are presented. The source expressiveness defines this way a strict subset of SQL queries that can only be supported.

Let us consider the possible responses that the forms may generate. The Article form always generates a list of publications that match the input substring. Such a result is basically a select operation on the Article table. For the Author form there are two cases. If multiple authors match the substring then the list of all matching authors is generated. This is also a select-type operation. If only one author matches the substring then the form generates a list of publications for that author. This operation corresponds to a join between Article and one tuple of Author.

The three operations (that define the exact-result mapping of the form query capabilities into SQL queries) are formally defines as:

        f-authors("X") = select(name="X")(AUTHOR)
        f-1author("X") = "X" join PUBLISHED join ARTICLE;
        f-article("X") = select(title="X")(ARTICLE);

However, more complicated queries like:

select   a.aid
from     author a, publish p
where    a.aid = p.aid
and      a.name = "John"
group by a.aid
having   count(*) = (select   max(count(*))
                     from     author a, publish p, title t
                     where    a.aid = p.aid
                     and      p.tid = t.tid
                     and      a.name = "John"
                     and      t.title like "Survey"
                     group by a.aid);

cannot be answered directly using the data forms. We have to consider multiple applications of the base operators and implicitly additional data transfer in order to solve them. Note that, since the base operations are able to retrieve the whole data space, we must be able to express all the queries (if the option of shipping the whole data is found acceptable by the user).

The SQL query above gives the authors named ``John'' with the most number of survey publications. The query can be answered only locally, and additional information about all the surveys and the authors are needed. In this case, a form containing ``Survey'' sent to Article and a form containing ``John'' sent to Author are enough to solve the query.

The last example above suggests that, in order to be able to answer any possible query of the user, other intermediary phases has to be added in this process too. First, a new query that can be answered using the data forms has to be derived from the initial query. Then, the result of the derived query has to be processed further at the local site in order to get the exact result.


next up previous
Next: SQL-Support Up: Converting SQL to HTTP-Requests Previous: Converting SQL to HTTP-Requests

Andreas Koeller
Mon May 10 13:40:38 EDT 1999