4.1  :  Web Browser Interface

In this page we explain the use of the web interface for querying the database. This will (hopefully) not be the main interface for long for most users, as other access methods to the databases listed in the following few pages are more efficient. But for getting to know the databas estructure and trying out queries it will remain useful. The web interface is reproduced below in two parts as a complete page is too large to fit on the screen in general. The first part shows the top part, the second the part with results of queries. Each part has red boxes which are active and from which one reaches the corresponding description.


First a short word about sessions. Everytime a user connects for the first time to the web application a sessioni> is started. This session holds on to information about the user and the state of the application. The state mainly consists of the result of the last browser query (see below) and to a history of the queries that have been executed. Since such a session puts burdens on the web server, they are usually timed out when they have been inactive for too long. This time is of the order of 5 minutes. After a timeout a user will still be able to execute queries but history is no longer available and also reformatting and plotting are no longer available. When this happens the user should enter the web site anew from a new window.
NB Sessions are preserved through cookies, so this feature should be enabled for this web site.

Screen shots: upper part

Documentation Public Databases MyDB Query Area Previous Queries Demo Queries Metadata Queries


The Documentation link in this area leads to the help page area. The Credit/Acknowledgment link leads to a page stating the credits one should make when using the results published through these pages.

Public Databases

The tree of public databases provided links to documentation of the tables, views and other useful database objects. One of the databases in this list, or possibly in the following list of protected databases will be labelled with "(context)". What this means is that in queries one does not need to write the name of the database in front of the table and possible schema name (see the page on T-SQL for details).

MyDB databases

This area shows when a user has an account and through this access to protected databases. In this part of the menu we do (currently) not list the tables and other possible objects of a database. To get access to them one should click on the database and follow links from the page that appears then. The "(r)" or "(rw)" after a database indicates whether a user has only read, or also write permissions on the database.

Query Area

This is the area where one enters and executes the SQL statements. Queries should not contain any comments, which in SQL are indicated by two hypens, "--" in front of the comment.

There are two modes of executing queries on the GAVO web sites, indicated by the two different "Query" buttons. The first, "Query (stream)", puts the least burden on the server in that results of the queries are returned to the web browser as soon as they arrive from the database. This in contrast to the "Query (browser)" button, which causes the complete result to be cached on the server. The advantage of this is that further action on these results is more easily executed, such as plotting and reformatting (see below). The query does not have to be re-executed when a user selects on of those. The disadvantage is the obvious memory overhead on the server. For that reason such queries have a limit on the number of rows that the query can return as indicated in the text above the query panel. In general the streaming queries do not have such a limit.

This web interface does not allow one to interrupt/cancel a query after it has been submitted. For this reason both query modes have a query timeout that is rather restrictive. Queries that exceed this time are cancelled. It is otherwise too easy to clog the server with requests, whether by accident or on purpose. Plans are underway to provide batch support ala CAS-Jobs on the SDSS SkyServer. This will allow more control on the execution scheduling of queries and allow longer queries.

The drop down in this area limits the number of rows that will be returned in browser query mode as HTML to the client. A subsequent reformat or plot request will have access to the whole result. To limit the number of rows the database returns can be done in SQL itself.

Previous Queries

All queries that have been executed during the course of a given session are stored in a history and can be retrieved in two different ways. The drop down contains them all and selecting one will automatically put the given query in the query window. Alternatively one can click the "Show All" button, which will open a new window containing all the queries. Refreshing that window will reload it, but beware of the issues mention in the paragraph on sessions above.

Demo Queries

Clicking on one of the "demo query" buttons will make the corresponding query appear in the main query window for execution. They are intended to show various features of the databases. They are documented here.

Metadata Queries

The buttons in this area, which is only avilable on the page if the user has logged in to her/his account, has example statements for querying the metadata of a database, or possibly even to update the database. These are documented here.

Screen shots: query result

Whan a query in "browser" mode has beene xecuted succesfully the result will be shown as an HTML table in the bootom of the screen. The follwoing figure shows an example screen shot of that part. It is described below.

The main result is shown in the table, with column names corresponding to the SELECT part of the sql query. At most as many rows are shown as was requested in the corresponding drop down inthe query area. The main functionality of this area has to do some postprocessing on the result. In general this query mode is for demonstration/illustration purposes only, but sometimes these are useful.


Clicking the "Reformat" button will produce the complete query result in the format indicated by the drop down. It will do so in a separate window.

Plot (VOPlot)

The result can also be visualised using the VOPlot utility as an applet. This function should be used with some care. VOPlot requires the format in VOTable form, which is rather wordy and when loaded into the browser can take up more memory than the browser can handle. So for large result sets, whether in rows or columns, one should take care.